Handle module errors more robustly and add query params to light preset and transition (#1036)

Ensures that all modules try to access their data in `_post_update_hook` in a safe manner and disable themselves if there's an error.
Also adds parameters to get_preset_rules and get_on_off_gradually_info to fix issues with recent firmware updates.
[#1033](https://github.com/python-kasa/python-kasa/issues/1033)
This commit is contained in:
Steven B
2024-07-04 08:02:50 +01:00
committed by GitHub
parent 9cffbe9e48
commit 905a14895d
17 changed files with 206 additions and 30 deletions

View File

@@ -230,7 +230,7 @@ class LightTransition(SmartModule):
if self._state_in_sysinfo:
return {}
else:
return {self.QUERY_GETTER_NAME: None}
return {self.QUERY_GETTER_NAME: {}}
async def _check_supported(self):
"""Additional check to see if the module is supported by the device."""