mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-12-01 21:58:17 +00:00
Add light presets common module to devices. (#907)
Adds light preset common module for switching to presets and saving presets. Deprecates the `presets` attribute and `save_preset` method from the `bulb` interface in favour of the modular approach. Allows setting preset for `iot` which was not previously supported.
This commit is contained in:
@@ -312,11 +312,13 @@ class IotDevice(Device):
|
||||
|
||||
await self._modular_update(req)
|
||||
|
||||
self._set_sys_info(self._last_update["system"]["get_sysinfo"])
|
||||
for module in self._modules.values():
|
||||
module._post_update_hook()
|
||||
|
||||
if not self._features:
|
||||
await self._initialize_features()
|
||||
|
||||
self._set_sys_info(self._last_update["system"]["get_sysinfo"])
|
||||
|
||||
async def _initialize_modules(self):
|
||||
"""Initialize modules not added in init."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user