Add reauth support to myq (#49998)
This commit is contained in:
parent
8e0e1405e8
commit
42c48e8cf9
8 changed files with 161 additions and 85 deletions
|
@ -32,7 +32,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
|||
coordinator = data[MYQ_COORDINATOR]
|
||||
|
||||
async_add_entities(
|
||||
[MyQDevice(coordinator, device) for device in myq.covers.values()], True
|
||||
[MyQDevice(coordinator, device) for device in myq.covers.values()]
|
||||
)
|
||||
|
||||
|
||||
|
@ -158,9 +158,3 @@ class MyQDevice(CoordinatorEntity, CoverEntity):
|
|||
if self._device.parent_device_id:
|
||||
device_info["via_device"] = (DOMAIN, self._device.parent_device_id)
|
||||
return device_info
|
||||
|
||||
async def async_added_to_hass(self):
|
||||
"""Subscribe to updates."""
|
||||
self.async_on_remove(
|
||||
self.coordinator.async_add_listener(self.async_write_ha_state)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue