From 6b003b0ef33e767af0d450cc27544412634b22c9 Mon Sep 17 00:00:00 2001 From: Adam Kirschner Date: Mon, 6 Jan 2025 21:26:27 -0500 Subject: [PATCH] alpha 4 --- custom_components/htd/__init__.py | 4 ++-- custom_components/htd/manifest.json | 4 ++-- custom_components/htd/media_player.py | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/custom_components/htd/__init__.py b/custom_components/htd/__init__.py index 9594bdc..61338d1 100644 --- a/custom_components/htd/__init__.py +++ b/custom_components/htd/__init__.py @@ -30,7 +30,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry): config_entry.runtime_data = get_client(kind, host, port) config_entry.async_on_unload( - config_entry.add_update_listener(update_listener) + config_entry.add_update_listener(async_update_listener) ) _async_cleanup_registry_entries(hass, config_entry) @@ -42,7 +42,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry): return True -async def update_listener( +async def async_update_listener( hass: HomeAssistant, config_entry: ConfigEntry ) -> None: diff --git a/custom_components/htd/manifest.json b/custom_components/htd/manifest.json index 70d501c..897377b 100644 --- a/custom_components/htd/manifest.json +++ b/custom_components/htd/manifest.json @@ -6,12 +6,12 @@ "@hikirsch" ], "name": "Home Theater Direct", - "version": "2.0.0-alpha.3", + "version": "2.0.0-alpha.4", "iot_class": "local_push", "integration_type": "hub", "dependencies": [], "requirements": [ - "htd_client==0.0.6" + "htd_client==0.0.8" ], "config_flow": true, "dhcp": [ diff --git a/custom_components/htd/media_player.py b/custom_components/htd/media_player.py index a30f903..1627d97 100644 --- a/custom_components/htd/media_player.py +++ b/custom_components/htd/media_player.py @@ -178,6 +178,9 @@ def _do_update(self, zone: int): if zone is not None and zone != self.zone: return + if not self.client.has_zone_data(self.zone): + return + # if there's a target volume for mca, don't update yet if isinstance(self.client, HtdMcaClient) and self.client.has_volume_target(self.zone): return