Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error in got_connected for remote.harmony #19662

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions homeassistant/components/remote/harmony.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from homeassistant.exceptions import PlatformNotReady
from homeassistant.util import slugify

REQUIREMENTS = ['aioharmony==0.1.1']
REQUIREMENTS = ['aioharmony==0.1.2']

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -216,6 +216,7 @@ def new_activity(self, activity_info: tuple) -> None:
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):
Expand All @@ -224,13 +225,12 @@ async def new_config(self, _=None):
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):
MartinHjelmare marked this conversation as resolved.
Show resolved Hide resolved
"""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."""
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down