From 43eaa960e8a78dcf0890e15ed931ebc4964075b9 Mon Sep 17 00:00:00 2001 From: ehendrix23 Date: Sun, 30 Dec 2018 11:35:08 -0700 Subject: [PATCH] Fix error in got_connected for remote.harmony (#19662) * Fix config call in connected * Change aioharmony version for fixes --- homeassistant/components/remote/harmony.py | 8 ++++---- requirements_all.txt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/remote/harmony.py b/homeassistant/components/remote/harmony.py index aeb3d85d91c..4df471aa918 100644 --- a/homeassistant/components/remote/harmony.py +++ b/homeassistant/components/remote/harmony.py @@ -22,7 +22,7 @@ import homeassistant.helpers.config_validation as cv from homeassistant.exceptions import PlatformNotReady from homeassistant.util import slugify -REQUIREMENTS = ['aioharmony==0.1.1'] +REQUIREMENTS = ['aioharmony==0.1.2'] _LOGGER = logging.getLogger(__name__) @@ -216,6 +216,7 @@ class HarmonyRemote(remote.RemoteDevice): activity_name) self._current_activity = activity_name self._state = bool(activity_id != -1) + self._available = True self.async_schedule_update_ha_state() async def new_config(self, _=None): @@ -224,13 +225,12 @@ class HarmonyRemote(remote.RemoteDevice): self.new_activity(self._client.current_activity) await self.hass.async_add_executor_job(self.write_config_file) - def got_connected(self, _=None): + async def got_connected(self, _=None): """Notification that we're connected to the HUB.""" _LOGGER.debug("%s: connected to the HUB.", self._name) if not self._available: # We were disconnected before. - self.new_config() - self._available = True + await self.new_config() async def got_disconnected(self, _=None): """Notification that we're disconnected from the HUB.""" diff --git a/requirements_all.txt b/requirements_all.txt index d1a0df3a88e..87b97cc2746 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -105,7 +105,7 @@ aiofreepybox==0.0.6 aioftp==0.12.0 # homeassistant.components.remote.harmony -aioharmony==0.1.1 +aioharmony==0.1.2 # homeassistant.components.emulated_hue # homeassistant.components.http