Do not pass hass.data to Sonos entities (#49881)

This commit is contained in:
jjlawren 2021-04-30 00:01:09 -05:00 committed by GitHub
parent 73714eba4b
commit adba82de8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 15 deletions

View file

@ -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."""