1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-11 15:52:20 +01:00

Use inclusive terminology (#1137)

This commit is contained in:
Otto Winter
2020-07-14 18:45:42 +02:00
committed by GitHub
parent 5776e70d7c
commit 412351fd1e
7 changed files with 35 additions and 16 deletions

View File

@@ -177,7 +177,7 @@ const std::string &Nameable::get_object_id() { return this->object_id_; }
bool Nameable::is_internal() const { return this->internal_; }
void Nameable::set_internal(bool internal) { this->internal_ = internal; }
void Nameable::calc_object_id_() {
this->object_id_ = sanitize_string_whitelist(to_lowercase_underscore(this->name_), HOSTNAME_CHARACTER_WHITELIST);
this->object_id_ = sanitize_string_allowlist(to_lowercase_underscore(this->name_), HOSTNAME_CHARACTER_ALLOWLIST);
// FNV-1 hash
this->object_id_hash_ = fnv1_hash(this->object_id_);
}