Fix error in got_connected for remote.harmony (#19662)

* Fix config call in connected

* Change aioharmony version for fixes
pull/19612/head
ehendrix23 2018-12-30 11:35:08 -07:00 committed by Charles Garwood
parent 81a0ce621e
commit 43eaa960e8
2 changed files with 5 additions and 5 deletions

View File

@ -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."""

View File

@ -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