mirror of
https://github.com/esphome/esphome.git
synced 2025-09-12 00:02:21 +01:00
Update esphome/core/entity_base.cpp
This commit is contained in:
@@ -40,7 +40,8 @@ std::string EntityBase::get_object_id() const {
|
|||||||
if (!this->flags_.has_own_name && App.is_name_add_mac_suffix_enabled()) {
|
if (!this->flags_.has_own_name && App.is_name_add_mac_suffix_enabled()) {
|
||||||
// `App.get_friendly_name()` is dynamic.
|
// `App.get_friendly_name()` is dynamic.
|
||||||
return str_sanitize(str_snake_case(App.get_friendly_name()));
|
return str_sanitize(str_snake_case(App.get_friendly_name()));
|
||||||
} else { // `App.get_friendly_name()` is constant.
|
} else {
|
||||||
|
// `App.get_friendly_name()` is constant.
|
||||||
if (this->object_id_c_str_ == nullptr) {
|
if (this->object_id_c_str_ == nullptr) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user