Add watchdog reset to on_connect in Ambient (#22956)

This commit is contained in:
Aaron Bach 2019-04-10 15:25:19 -06:00 committed by GitHub
parent 7862fdd27e
commit 153c6957b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -329,6 +329,8 @@ class AmbientStation:
"""Define a handler to fire when the websocket is connected."""
_LOGGER.info('Connected to websocket')
_LOGGER.debug('Watchdog starting')
if self._watchdog_listener:
self._watchdog_listener()
self._watchdog_listener = async_call_later(
self._hass, DEFAULT_WATCHDOG_SECONDS, _ws_reconnect)