Fix Sonos updating when entities are disabled (#62456)

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
jjlawren 2021-12-21 23:36:12 -05:00 committed by GitHub
parent cceedf766a
commit 4475e88707
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 24 additions and 32 deletions

View file

@ -10,15 +10,11 @@ from soco.core import SoCo
from soco.exceptions import SoCoException
import homeassistant.helpers.device_registry as dr
from homeassistant.helpers.dispatcher import (
async_dispatcher_connect,
async_dispatcher_send,
)
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity import DeviceInfo, Entity
from .const import (
DOMAIN,
SONOS_ENTITY_CREATED,
SONOS_FAVORITES_UPDATED,
SONOS_POLL_UPDATE,
SONOS_STATE_UPDATED,
@ -60,9 +56,6 @@ class SonosEntity(Entity):
self.async_write_ha_state,
)
)
async_dispatcher_send(
self.hass, f"{SONOS_ENTITY_CREATED}-{self.soco.uid}", self.platform.domain
)
async def async_poll(self, now: datetime.datetime) -> None:
"""Poll the entity if subscriptions fail."""