Fix iCloud listeners (#76437)
parent
fe9c101817
commit
3fcdad74fc
|
@ -17,7 +17,7 @@ from pyicloud.services.findmyiphone import AppleDevice
|
|||
from homeassistant.components.zone import async_active_zone
|
||||
from homeassistant.config_entries import SOURCE_REAUTH, ConfigEntry
|
||||
from homeassistant.const import ATTR_ATTRIBUTION, CONF_USERNAME
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.core import CALLBACK_TYPE, HomeAssistant
|
||||
from homeassistant.exceptions import ConfigEntryNotReady
|
||||
from homeassistant.helpers.dispatcher import dispatcher_send
|
||||
from homeassistant.helpers.event import track_point_in_utc_time
|
||||
|
@ -104,6 +104,8 @@ class IcloudAccount:
|
|||
self._retried_fetch = False
|
||||
self._config_entry = config_entry
|
||||
|
||||
self.listeners: list[CALLBACK_TYPE] = []
|
||||
|
||||
def setup(self) -> None:
|
||||
"""Set up an iCloud account."""
|
||||
try:
|
||||
|
|
|
@ -34,7 +34,7 @@ async def async_setup_entry(
|
|||
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
|
||||
) -> None:
|
||||
"""Set up device tracker for iCloud component."""
|
||||
account = hass.data[DOMAIN][entry.unique_id]
|
||||
account: IcloudAccount = hass.data[DOMAIN][entry.unique_id]
|
||||
tracked = set[str]()
|
||||
|
||||
@callback
|
||||
|
|
|
@ -20,7 +20,7 @@ async def async_setup_entry(
|
|||
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
|
||||
) -> None:
|
||||
"""Set up device tracker for iCloud component."""
|
||||
account = hass.data[DOMAIN][entry.unique_id]
|
||||
account: IcloudAccount = hass.data[DOMAIN][entry.unique_id]
|
||||
tracked = set[str]()
|
||||
|
||||
@callback
|
||||
|
|
Loading…
Reference in New Issue