Add compatibility with sleeping Shelly gen2 devices with firmware 1.0.0 (#94864)
This commit is contained in:
parent
3bacd9df2f
commit
05039036f1
5 changed files with 64 additions and 4 deletions
|
@ -255,7 +255,11 @@ def get_block_device_sleep_period(settings: dict[str, Any]) -> int:
|
|||
|
||||
|
||||
def get_rpc_device_sleep_period(config: dict[str, Any]) -> int:
|
||||
"""Return the device sleep period in seconds or 0 for non sleeping devices."""
|
||||
"""Return the device sleep period in seconds or 0 for non sleeping devices.
|
||||
|
||||
sys.sleep.wakeup_period value is deprecated and not available in Shelly
|
||||
firmware 1.0.0 or later.
|
||||
"""
|
||||
return cast(int, config["sys"].get("sleep", {}).get("wakeup_period", 0))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue