Skip to content

Commit

Permalink
alpha 20 - loading bugs, latest version of hass
Browse files Browse the repository at this point in the history
  • Loading branch information
hikirsch committed Jan 17, 2025
1 parent d423c21 commit 53a4bad
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
8 changes: 3 additions & 5 deletions custom_components/htd/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Support for Home Theater Direct products"""

import asyncio
import logging

import voluptuous as vol
Expand Down Expand Up @@ -51,9 +50,6 @@ async def async_setup(hass: HomeAssistant, config: dict):
loop=hass.loop
)

while not client.ready:
await asyncio.sleep(0)

unique_id = f"{client.model['name']}-{serial_address}"

devices.append({
Expand All @@ -76,11 +72,13 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry):

network_address = (host, port)

config_entry.runtime_data = await async_get_client(
client = await async_get_client(
network_address=network_address,
loop=hass.loop
)

config_entry.runtime_data = client

config_entry.async_on_unload(
config_entry.add_update_listener(async_update_listener)
)
Expand Down
2 changes: 1 addition & 1 deletion custom_components/htd/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"@hikirsch"
],
"name": "Home Theater Direct",
"version": "2.0.0-alpha.19",
"version": "2.0.0-alpha.20",
"iot_class": "local_push",
"integration_type": "hub",
"requirements": [
Expand Down
1 change: 1 addition & 0 deletions custom_components/htd/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ async def async_added_to_hass(self):
# Sensors should also register callbacks to HA when their state changes
# print('registering callback')
await self.client.async_subscribe(self._do_update)
self.client.refresh()

async def async_will_remove_from_hass(self):
"""Entity being removed from hass."""
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
homeassistant==2024.12.5
homeassistant==2025.1.2

0 comments on commit 53a4bad

Please sign in to comment.