mirror of
https://github.com/esphome/esphome.git
synced 2025-08-10 12:27:46 +00: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()) {
|
||||
// `App.get_friendly_name()` is dynamic.
|
||||
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) {
|
||||
return "";
|
||||
}
|
||||
|
Reference in New Issue
Block a user