Make Light and Fan a common module interface (#911)

This commit is contained in:
Steven B
2024-05-13 17:34:44 +01:00
committed by GitHub
parent d7b00336f4
commit 33d839866e
32 changed files with 544 additions and 342 deletions

View File

@@ -307,6 +307,9 @@ class IotDevice(Device):
self._last_update = response
self._set_sys_info(response["system"]["get_sysinfo"])
if not self._modules:
await self._initialize_modules()
await self._modular_update(req)
if not self._features:
@@ -314,6 +317,9 @@ class IotDevice(Device):
self._set_sys_info(self._last_update["system"]["get_sysinfo"])
async def _initialize_modules(self):
"""Initialize modules not added in init."""
async def _initialize_features(self):
self._add_feature(
Feature(