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

Remove callback decorators in Cambridge Audio #126082

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
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