mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Fix error in got_connected for remote.harmony (#19662)
* Fix config call in connected * Change aioharmony version for fixes
This commit is contained in:
parent
81a0ce621e
commit
43eaa960e8
@ -22,7 +22,7 @@ import homeassistant.helpers.config_validation as cv
|
|||||||
from homeassistant.exceptions import PlatformNotReady
|
from homeassistant.exceptions import PlatformNotReady
|
||||||
from homeassistant.util import slugify
|
from homeassistant.util import slugify
|
||||||
|
|
||||||
REQUIREMENTS = ['aioharmony==0.1.1']
|
REQUIREMENTS = ['aioharmony==0.1.2']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -216,6 +216,7 @@ class HarmonyRemote(remote.RemoteDevice):
|
|||||||
activity_name)
|
activity_name)
|
||||||
self._current_activity = activity_name
|
self._current_activity = activity_name
|
||||||
self._state = bool(activity_id != -1)
|
self._state = bool(activity_id != -1)
|
||||||
|
self._available = True
|
||||||
self.async_schedule_update_ha_state()
|
self.async_schedule_update_ha_state()
|
||||||
|
|
||||||
async def new_config(self, _=None):
|
async def new_config(self, _=None):
|
||||||
@ -224,13 +225,12 @@ class HarmonyRemote(remote.RemoteDevice):
|
|||||||
self.new_activity(self._client.current_activity)
|
self.new_activity(self._client.current_activity)
|
||||||
await self.hass.async_add_executor_job(self.write_config_file)
|
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."""
|
"""Notification that we're connected to the HUB."""
|
||||||
_LOGGER.debug("%s: connected to the HUB.", self._name)
|
_LOGGER.debug("%s: connected to the HUB.", self._name)
|
||||||
if not self._available:
|
if not self._available:
|
||||||
# We were disconnected before.
|
# We were disconnected before.
|
||||||
self.new_config()
|
await self.new_config()
|
||||||
self._available = True
|
|
||||||
|
|
||||||
async def got_disconnected(self, _=None):
|
async def got_disconnected(self, _=None):
|
||||||
"""Notification that we're disconnected from the HUB."""
|
"""Notification that we're disconnected from the HUB."""
|
||||||
|
@ -105,7 +105,7 @@ aiofreepybox==0.0.6
|
|||||||
aioftp==0.12.0
|
aioftp==0.12.0
|
||||||
|
|
||||||
# homeassistant.components.remote.harmony
|
# homeassistant.components.remote.harmony
|
||||||
aioharmony==0.1.1
|
aioharmony==0.1.2
|
||||||
|
|
||||||
# homeassistant.components.emulated_hue
|
# homeassistant.components.emulated_hue
|
||||||
# homeassistant.components.http
|
# homeassistant.components.http
|
||||||
|
Loading…
x
Reference in New Issue
Block a user