mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 19:23:34 +00:00
Only refresh smart LightEffect module daily (#1064)
Fixes an issue with L530 bulbs on HW version 1.0 whereby the light effect query causes the device to crash with JSON_ENCODE_FAIL_ERROR after approximately 60 calls.
This commit is contained in:
parent
448efd7e4c
commit
a97d2c92bb
@ -17,7 +17,7 @@ class LightEffect(SmartModule, SmartLightEffect):
|
|||||||
|
|
||||||
REQUIRED_COMPONENT = "light_effect"
|
REQUIRED_COMPONENT = "light_effect"
|
||||||
QUERY_GETTER_NAME = "get_dynamic_light_effect_rules"
|
QUERY_GETTER_NAME = "get_dynamic_light_effect_rules"
|
||||||
MINIMUM_UPDATE_INTERVAL_SECS = 60
|
MINIMUM_UPDATE_INTERVAL_SECS = 60 * 60 * 24
|
||||||
AVAILABLE_BULB_EFFECTS = {
|
AVAILABLE_BULB_EFFECTS = {
|
||||||
"L1": "Party",
|
"L1": "Party",
|
||||||
"L2": "Relax",
|
"L2": "Relax",
|
||||||
@ -74,6 +74,7 @@ class LightEffect(SmartModule, SmartLightEffect):
|
|||||||
"""Return effect name."""
|
"""Return effect name."""
|
||||||
return self._effect
|
return self._effect
|
||||||
|
|
||||||
|
@allow_update_after
|
||||||
async def set_effect(
|
async def set_effect(
|
||||||
self,
|
self,
|
||||||
effect: str,
|
effect: str,
|
||||||
|
Loading…
Reference in New Issue
Block a user