1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-14 09:12:19 +01:00

Cleaning up

This commit is contained in:
Daniel Vikström
2025-04-09 19:20:28 +02:00
parent 962e0c4c33
commit 32f4e4ca13
3 changed files with 3 additions and 5 deletions

View File

@@ -252,6 +252,8 @@ class Application {
#ifdef USE_SUB_DEVICE
const std::vector<devices::SubDevice *> &get_sub_devices() { return this->sub_devices_; }
// /* Very likely no need for get_sub_device_by_key as it only seem to be used when requesting update from API
// and the sub_devices shaould only be sent once at connection. */
// devices::SubDevice *get_sub_device_by_key(uint32_t key, bool include_internal = false) {
// for (auto *obj : this->sub_devices_) {
// if (obj->get_object_id_hash() == key && (include_internal || !obj->is_internal()))

View File

@@ -35,7 +35,7 @@ std::string EntityBase::get_icon() const {
}
void EntityBase::set_icon(const char *icon) { this->icon_c_str_ = icon; }
// Entity Device Name
// Entity Device id
const StringRef &EntityBase::get_device_id() const {
if (this->device_id_.empty()) {
return StringRef("");

View File

@@ -89,10 +89,6 @@ async def register_component(var, config):
return var
# async def register_sub_device(var, value):
# pass
async def register_parented(var, value):
if isinstance(value, ID):
paren = await get_variable(value)