From fd87fd9559fd074dcaa56c4073bfbe5e432fd05d Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Mon, 29 Jan 2024 10:32:15 +0100 Subject: [PATCH] Update attributes in Entity.__init__ in matter (#108877) --- homeassistant/components/matter/entity.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/matter/entity.py b/homeassistant/components/matter/entity.py index e308699acad..61535d990db 100644 --- a/homeassistant/components/matter/entity.py +++ b/homeassistant/components/matter/entity.py @@ -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: