Add watchdog reset to on_connect in Ambient (#22956)
This commit is contained in:
parent
7862fdd27e
commit
153c6957b9
1 changed files with 2 additions and 0 deletions
|
@ -329,6 +329,8 @@ class AmbientStation:
|
||||||
"""Define a handler to fire when the websocket is connected."""
|
"""Define a handler to fire when the websocket is connected."""
|
||||||
_LOGGER.info('Connected to websocket')
|
_LOGGER.info('Connected to websocket')
|
||||||
_LOGGER.debug('Watchdog starting')
|
_LOGGER.debug('Watchdog starting')
|
||||||
|
if self._watchdog_listener:
|
||||||
|
self._watchdog_listener()
|
||||||
self._watchdog_listener = async_call_later(
|
self._watchdog_listener = async_call_later(
|
||||||
self._hass, DEFAULT_WATCHDOG_SECONDS, _ws_reconnect)
|
self._hass, DEFAULT_WATCHDOG_SECONDS, _ws_reconnect)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue