Skip to content

Commit

Permalink
Revert watchdog back to once every 7.5 minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly committed Dec 13, 2023
1 parent 83872b1 commit 3ebc0ac
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions zigpy_deconz/zigbee/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ class ControllerApplication(zigpy.application.ControllerApplication):
{zigpy.config.CONF_DEVICE_BAUDRATE: 115200},
]

_watchdog_period = 600 * 0.75

def __init__(self, config: dict[str, Any]):
"""Initialize instance."""

Expand All @@ -78,15 +80,15 @@ def __init__(self, config: dict[str, Any]):
self._written_endpoints = set()

async def _watchdog_feed(self):
await self._api.get_device_state()

if self._api.protocol_version >= PROTO_VER_WATCHDOG and not (
self._api.firmware_version.platform == FirmwarePlatform.Conbee_III
and self._api.firmware_version <= 0x26450900
):
await self._api.write_parameter(
NetworkParameter.watchdog_ttl, int(2 * self._watchdog_period)
NetworkParameter.watchdog_ttl, int(self._watchdog_period / 0.75)
)
else:
await self._api.get_device_state()

async def connect(self):
api = Deconz(self, self._config[zigpy.config.CONF_DEVICE])
Expand Down

0 comments on commit 3ebc0ac

Please sign in to comment.