mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 22:37:11 +00:00
Update attributes in Entity.__init__ in matter (#108877)
This commit is contained in:
parent
95aea1488d
commit
fd87fd9559
@ -82,6 +82,9 @@ class MatterEntity(Entity):
|
||||
self._attr_should_poll = entity_info.should_poll
|
||||
self._extra_poll_timer_unsub: CALLBACK_TYPE | None = None
|
||||
|
||||
# make sure to update the attributes once
|
||||
self._update_from_device()
|
||||
|
||||
async def async_added_to_hass(self) -> None:
|
||||
"""Handle being added to Home Assistant."""
|
||||
await super().async_added_to_hass()
|
||||
@ -115,9 +118,6 @@ class MatterEntity(Entity):
|
||||
)
|
||||
)
|
||||
|
||||
# make sure to update the attributes once
|
||||
self._update_from_device()
|
||||
|
||||
async def async_will_remove_from_hass(self) -> None:
|
||||
"""Run when entity will be removed from hass."""
|
||||
if self._extra_poll_timer_unsub:
|
||||
|
Loading…
x
Reference in New Issue
Block a user