From 6baa8082d572de84fccb5b5ee3697882fa25fa05 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 19 Oct 2023 11:12:56 -1000 Subject: [PATCH] Bump aiohomekit to 3.0.6 (#102341) --- homeassistant/components/homekit_controller/entity.py | 5 ++++- homeassistant/components/homekit_controller/manifest.json | 2 +- homeassistant/components/homekit_controller/media_player.py | 1 + homeassistant/components/homekit_controller/sensor.py | 1 + requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 6 files changed, 9 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/homekit_controller/entity.py b/homeassistant/components/homekit_controller/entity.py index f8566f10b0d..796f227e0cc 100644 --- a/homeassistant/components/homekit_controller/entity.py +++ b/homeassistant/components/homekit_controller/entity.py @@ -36,6 +36,7 @@ class HomeKitEntity(Entity): pollable_characteristics: list[tuple[int, int]] watchable_characteristics: list[tuple[int, int]] all_characteristics: set[tuple[int, int]] + accessory_info: Service def __init__(self, accessory: HKDevice, devinfo: ConfigType) -> None: """Initialise a generic HomeKit device.""" @@ -144,9 +145,11 @@ class HomeKitEntity(Entity): accessory = self._accessory self.accessory = accessory.entity_map.aid(self._aid) self.service = self.accessory.services.iid(self._iid) - self.accessory_info = self.accessory.services.first( + accessory_info = self.accessory.services.first( service_type=ServicesTypes.ACCESSORY_INFORMATION ) + assert accessory_info + self.accessory_info = accessory_info # If we re-setup, we need to make sure we make new # lists since we passed them to the connection before # and we do not want to inadvertently modify the old diff --git a/homeassistant/components/homekit_controller/manifest.json b/homeassistant/components/homekit_controller/manifest.json index 5687cd4dba3..9c989563b6a 100644 --- a/homeassistant/components/homekit_controller/manifest.json +++ b/homeassistant/components/homekit_controller/manifest.json @@ -14,6 +14,6 @@ "documentation": "https://www.home-assistant.io/integrations/homekit_controller", "iot_class": "local_push", "loggers": ["aiohomekit", "commentjson"], - "requirements": ["aiohomekit==3.0.5"], + "requirements": ["aiohomekit==3.0.6"], "zeroconf": ["_hap._tcp.local.", "_hap._udp.local."] } diff --git a/homeassistant/components/homekit_controller/media_player.py b/homeassistant/components/homekit_controller/media_player.py index 1efa33429b1..90d1ba754f2 100644 --- a/homeassistant/components/homekit_controller/media_player.py +++ b/homeassistant/components/homekit_controller/media_player.py @@ -159,6 +159,7 @@ class HomeKitTelevision(HomeKitEntity, MediaPlayerEntity): characteristics={CharacteristicsTypes.IDENTIFIER: active_identifier}, parent_service=this_tv, ) + assert input_source char = input_source[CharacteristicsTypes.CONFIGURED_NAME] return char.value diff --git a/homeassistant/components/homekit_controller/sensor.py b/homeassistant/components/homekit_controller/sensor.py index 0f481c5c7ee..1f17d32f912 100644 --- a/homeassistant/components/homekit_controller/sensor.py +++ b/homeassistant/components/homekit_controller/sensor.py @@ -667,6 +667,7 @@ async def async_setup_entry( accessory_info = accessory.services.first( service_type=ServicesTypes.ACCESSORY_INFORMATION ) + assert accessory_info info = {"aid": accessory.aid, "iid": accessory_info.iid} entity = RSSISensor(conn, info) conn.async_migrate_unique_id( diff --git a/requirements_all.txt b/requirements_all.txt index f2cda4fd70d..6398afafdca 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -255,7 +255,7 @@ aioguardian==2022.07.0 aioharmony==0.2.10 # homeassistant.components.homekit_controller -aiohomekit==3.0.5 +aiohomekit==3.0.6 # homeassistant.components.emulated_hue # homeassistant.components.http diff --git a/requirements_test_all.txt b/requirements_test_all.txt index fdef44810c8..a19c88b895e 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -233,7 +233,7 @@ aioguardian==2022.07.0 aioharmony==0.2.10 # homeassistant.components.homekit_controller -aiohomekit==3.0.5 +aiohomekit==3.0.6 # homeassistant.components.emulated_hue # homeassistant.components.http