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

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.
Cherry pick of [#1036](https://github.com/python-kasa/python-kasa/pull/1036) to patch
This commit is contained in:
Steven B
2024-07-04 08:29:53 +01:00
committed by GitHub
parent 2f24797033
commit fe116eaefb
17 changed files with 206 additions and 30 deletions

View File

@@ -58,6 +58,10 @@ class TemperatureSensor(SmartModule):
)
)
def query(self) -> dict:
"""Query to execute during the update cycle."""
return {}
@property
def temperature(self):
"""Return current humidity in percentage."""