mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Set config_entry explicitly in switcher kis coordinator (#129419)
This commit is contained in:
parent
10fdf819d3
commit
8f7ae2665c
@ -23,6 +23,8 @@ class SwitcherDataUpdateCoordinator(
|
||||
):
|
||||
"""Switcher device data update coordinator."""
|
||||
|
||||
config_entry: ConfigEntry
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
hass: HomeAssistant,
|
||||
@ -33,10 +35,10 @@ class SwitcherDataUpdateCoordinator(
|
||||
super().__init__(
|
||||
hass,
|
||||
_LOGGER,
|
||||
config_entry=entry,
|
||||
name=device.name,
|
||||
update_interval=timedelta(seconds=MAX_UPDATE_INTERVAL_SEC),
|
||||
)
|
||||
self.entry = entry
|
||||
self.data = device
|
||||
self.token = entry.data.get(CONF_TOKEN)
|
||||
|
||||
@ -67,7 +69,7 @@ class SwitcherDataUpdateCoordinator(
|
||||
"""Set up the coordinator."""
|
||||
dev_reg = dr.async_get(self.hass)
|
||||
dev_reg.async_get_or_create(
|
||||
config_entry_id=self.entry.entry_id,
|
||||
config_entry_id=self.config_entry.entry_id,
|
||||
connections={(dr.CONNECTION_NETWORK_MAC, self.mac_address)},
|
||||
identifiers={(DOMAIN, self.device_id)},
|
||||
manufacturer="Switcher",
|
||||
|
Loading…
x
Reference in New Issue
Block a user