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 runtime data in Cambridge Audio #132285

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
4 changes: 2 additions & 2 deletions homeassistant/components/cambridge_audio/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/cambridge_audio/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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."""
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/cambridge_audio/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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."""
Expand Down