Skip to content

Commit

Permalink
Remove callback decorators in Cambridge Audio (home-assistant#126082)
Browse files Browse the repository at this point in the history
Remove callback decorator from async methods in Cambridge Audio
  • Loading branch information
noahhusby authored Sep 16, 2024
1 parent 351de1c commit 529e120
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions homeassistant/components/cambridge_audio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_HOST, Platform
from homeassistant.core import HomeAssistant, callback
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryNotReady

from .const import CONNECT_TIMEOUT, STREAM_MAGIC_EXCEPTIONS
Expand All @@ -29,7 +29,6 @@ async def async_setup_entry(

client = StreamMagicClient(entry.data[CONF_HOST])

@callback
async def _connection_update_callback(
_client: StreamMagicClient, _callback_type: CallbackType
) -> None:
Expand Down
5 changes: 1 addition & 4 deletions homeassistant/components/cambridge_audio/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@
from aiostreammagic import StreamMagicClient
from aiostreammagic.models import CallbackType

from homeassistant.core import callback
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.entity import Entity

from . import STREAM_MAGIC_EXCEPTIONS
from .const import DOMAIN
from .const import DOMAIN, STREAM_MAGIC_EXCEPTIONS


def command[_EntityT: CambridgeAudioEntity, **_P](
Expand Down Expand Up @@ -51,7 +49,6 @@ def __init__(self, client: StreamMagicClient) -> None:
configuration_url=f"http://{client.host}",
)

@callback
async def _state_update_callback(
self, _client: StreamMagicClient, _callback_type: CallbackType
) -> None:
Expand Down

0 comments on commit 529e120

Please sign in to comment.