mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 15:12:06 +00:00 
			
		
		
		
	Cleaning up
This commit is contained in:
		| @@ -252,6 +252,8 @@ class Application { | |||||||
|  |  | ||||||
| #ifdef USE_SUB_DEVICE | #ifdef USE_SUB_DEVICE | ||||||
|   const std::vector<devices::SubDevice *> &get_sub_devices() { return this->sub_devices_; } |   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) { |   // devices::SubDevice *get_sub_device_by_key(uint32_t key, bool include_internal = false) { | ||||||
|   //   for (auto *obj : this->sub_devices_) { |   //   for (auto *obj : this->sub_devices_) { | ||||||
|   //     if (obj->get_object_id_hash() == key && (include_internal || !obj->is_internal())) |   //     if (obj->get_object_id_hash() == key && (include_internal || !obj->is_internal())) | ||||||
|   | |||||||
| @@ -35,7 +35,7 @@ std::string EntityBase::get_icon() const { | |||||||
| } | } | ||||||
| void EntityBase::set_icon(const char *icon) { this->icon_c_str_ = icon; } | 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 { | const StringRef &EntityBase::get_device_id() const { | ||||||
|   if (this->device_id_.empty()) { |   if (this->device_id_.empty()) { | ||||||
|     return StringRef(""); |     return StringRef(""); | ||||||
|   | |||||||
| @@ -89,10 +89,6 @@ async def register_component(var, config): | |||||||
|     return var |     return var | ||||||
|  |  | ||||||
|  |  | ||||||
| # async def register_sub_device(var, value): |  | ||||||
| #     pass |  | ||||||
|  |  | ||||||
|  |  | ||||||
| async def register_parented(var, value): | async def register_parented(var, value): | ||||||
|     if isinstance(value, ID): |     if isinstance(value, ID): | ||||||
|         paren = await get_variable(value) |         paren = await get_variable(value) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user