mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 04:35:11 +02:00
Fix update happening too early in unifiprotect (#121714)
This commit is contained in:
@@ -182,7 +182,6 @@ class BaseProtectEntity(Entity):
|
||||
self._async_get_ufp_enabled = description.get_ufp_enabled
|
||||
|
||||
self._async_set_device_info()
|
||||
self._async_update_device_from_protect(device)
|
||||
self._state_getters = tuple(
|
||||
partial(attrgetter(attr), self) for attr in self._state_attrs
|
||||
)
|
||||
@@ -252,6 +251,7 @@ class BaseProtectEntity(Entity):
|
||||
self.async_on_remove(
|
||||
self.data.async_subscribe(self.device.mac, self._async_updated_event)
|
||||
)
|
||||
self._async_update_device_from_protect(self.device)
|
||||
|
||||
|
||||
class ProtectIsOnEntity(BaseProtectEntity):
|
||||
|
Reference in New Issue
Block a user