From c629f24f07cfc0e17b0e8418f77284e647b7b4d2 Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Sat, 15 Jun 2019 13:49:40 -0600 Subject: [PATCH] Fix a bug with Ambient PWS reconnection (#24540) --- homeassistant/components/ambient_station/__init__.py | 2 +- homeassistant/components/ambient_station/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/ambient_station/__init__.py b/homeassistant/components/ambient_station/__init__.py index 2c185c3bc71..1abdad5e925 100644 --- a/homeassistant/components/ambient_station/__init__.py +++ b/homeassistant/components/ambient_station/__init__.py @@ -327,7 +327,7 @@ 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: + if self._watchdog_listener is not None: self._watchdog_listener() self._watchdog_listener = async_call_later( self._hass, DEFAULT_WATCHDOG_SECONDS, _ws_reconnect) diff --git a/homeassistant/components/ambient_station/manifest.json b/homeassistant/components/ambient_station/manifest.json index 3e9bbf6a5b8..510edd540ec 100644 --- a/homeassistant/components/ambient_station/manifest.json +++ b/homeassistant/components/ambient_station/manifest.json @@ -4,7 +4,7 @@ "config_flow": true, "documentation": "https://www.home-assistant.io/components/ambient_station", "requirements": [ - "aioambient==0.3.0" + "aioambient==0.3.1" ], "dependencies": [], "codeowners": [ diff --git a/requirements_all.txt b/requirements_all.txt index 7a422a7b78b..8695fde6b8b 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -114,7 +114,7 @@ adguardhome==0.2.1 afsapi==0.0.4 # homeassistant.components.ambient_station -aioambient==0.3.0 +aioambient==0.3.1 # homeassistant.components.asuswrt aioasuswrt==1.1.21 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index b40047493ce..6e4148990fb 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -39,7 +39,7 @@ YesssSMS==0.2.3 adguardhome==0.2.1 # homeassistant.components.ambient_station -aioambient==0.3.0 +aioambient==0.3.1 # homeassistant.components.automatic aioautomatic==0.6.5