Do not pass hass.data to Sonos entities (#49881)
This commit is contained in:
parent
73714eba4b
commit
adba82de8b
4 changed files with 12 additions and 15 deletions
|
@ -13,7 +13,6 @@ from homeassistant.helpers.dispatcher import (
|
|||
)
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
from . import SonosData
|
||||
from .const import (
|
||||
DOMAIN,
|
||||
SONOS_ENTITY_CREATED,
|
||||
|
@ -28,10 +27,9 @@ _LOGGER = logging.getLogger(__name__)
|
|||
class SonosEntity(Entity):
|
||||
"""Representation of a Sonos entity."""
|
||||
|
||||
def __init__(self, speaker: SonosSpeaker, sonos_data: SonosData) -> None:
|
||||
def __init__(self, speaker: SonosSpeaker) -> None:
|
||||
"""Initialize a SonosEntity."""
|
||||
self.speaker = speaker
|
||||
self.data = sonos_data
|
||||
|
||||
async def async_added_to_hass(self) -> None:
|
||||
"""Handle common setup when added to hass."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue