From f88f80cc1ce902afc55d81c96184734791cca226 Mon Sep 17 00:00:00 2001 From: Noah Husby Date: Wed, 4 Dec 2024 17:42:10 +0000 Subject: [PATCH 1/2] Fix runtime data in Cambridge Audio --- homeassistant/components/cambridge_audio/media_player.py | 4 ++-- homeassistant/components/cambridge_audio/select.py | 4 ++-- homeassistant/components/cambridge_audio/switch.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/cambridge_audio/media_player.py b/homeassistant/components/cambridge_audio/media_player.py index 805cf8ec7f672..9896effb07d81 100644 --- a/homeassistant/components/cambridge_audio/media_player.py +++ b/homeassistant/components/cambridge_audio/media_player.py @@ -20,11 +20,11 @@ MediaType, RepeatMode, ) -from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.exceptions import HomeAssistantError, ServiceValidationError from homeassistant.helpers.entity_platform import AddEntitiesCallback +from . import CambridgeAudioConfigEntry from .const import ( CAMBRIDGE_MEDIA_TYPE_AIRABLE, CAMBRIDGE_MEDIA_TYPE_INTERNET_RADIO, @@ -62,7 +62,7 @@ async def async_setup_entry( hass: HomeAssistant, - entry: ConfigEntry, + entry: CambridgeAudioConfigEntry, async_add_entities: AddEntitiesCallback, ) -> None: """Set up Cambridge Audio device based on a config entry.""" diff --git a/homeassistant/components/cambridge_audio/select.py b/homeassistant/components/cambridge_audio/select.py index b1bc0f9e4df95..6bfe83c25390f 100644 --- a/homeassistant/components/cambridge_audio/select.py +++ b/homeassistant/components/cambridge_audio/select.py @@ -7,11 +7,11 @@ from aiostreammagic.models import DisplayBrightness from homeassistant.components.select import SelectEntity, SelectEntityDescription -from homeassistant.config_entries import ConfigEntry from homeassistant.const import EntityCategory from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback +from . import CambridgeAudioConfigEntry from .entity import CambridgeAudioEntity, command PARALLEL_UPDATES = 0 @@ -81,7 +81,7 @@ def _audio_output_value_fn(client: StreamMagicClient) -> str | None: async def async_setup_entry( hass: HomeAssistant, - entry: ConfigEntry, + entry: CambridgeAudioConfigEntry, async_add_entities: AddEntitiesCallback, ) -> None: """Set up Cambridge Audio select entities based on a config entry.""" diff --git a/homeassistant/components/cambridge_audio/switch.py b/homeassistant/components/cambridge_audio/switch.py index 72aa0d3cbeae1..065a1da4f9442 100644 --- a/homeassistant/components/cambridge_audio/switch.py +++ b/homeassistant/components/cambridge_audio/switch.py @@ -7,11 +7,11 @@ from aiostreammagic import StreamMagicClient from homeassistant.components.switch import SwitchEntity, SwitchEntityDescription -from homeassistant.config_entries import ConfigEntry from homeassistant.const import EntityCategory from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback +from . import CambridgeAudioConfigEntry from .entity import CambridgeAudioEntity, command PARALLEL_UPDATES = 0 @@ -45,7 +45,7 @@ class CambridgeAudioSwitchEntityDescription(SwitchEntityDescription): async def async_setup_entry( hass: HomeAssistant, - entry: ConfigEntry, + entry: CambridgeAudioConfigEntry, async_add_entities: AddEntitiesCallback, ) -> None: """Set up Cambridge Audio switch entities based on a config entry.""" From 1806d79236efb557b8d02e6267af3fd3f8b2056f Mon Sep 17 00:00:00 2001 From: Noah Husby Date: Wed, 4 Dec 2024 17:42:48 +0000 Subject: [PATCH 2/2] Update --- homeassistant/components/cambridge_audio/quality_scale.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/cambridge_audio/quality_scale.yaml b/homeassistant/components/cambridge_audio/quality_scale.yaml index 3d4963c3f2968..65b921268f45a 100644 --- a/homeassistant/components/cambridge_audio/quality_scale.yaml +++ b/homeassistant/components/cambridge_audio/quality_scale.yaml @@ -20,7 +20,7 @@ rules: entity-event-setup: done entity-unique-id: done has-entity-name: done - runtime-data: todo + runtime-data: done test-before-configure: done test-before-setup: done unique-config-entry: done