mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Fix uneeded state update in Idasen Desk sensor (#111433)
This commit is contained in:
parent
bfd82a0780
commit
5a8779551b
@ -91,10 +91,14 @@ class IdasenDeskSensor(CoordinatorEntity[IdasenDeskCoordinator], SensorEntity):
|
||||
async def async_added_to_hass(self) -> None:
|
||||
"""When entity is added to hass."""
|
||||
await super().async_added_to_hass()
|
||||
self._handle_coordinator_update()
|
||||
self._update_native_value()
|
||||
|
||||
@callback
|
||||
def _handle_coordinator_update(self, *args: Any) -> None:
|
||||
"""Handle data update."""
|
||||
self._attr_native_value = self.entity_description.value_fn(self.coordinator)
|
||||
self._update_native_value()
|
||||
super()._handle_coordinator_update()
|
||||
|
||||
def _update_native_value(self) -> None:
|
||||
"""Update the native value attribute."""
|
||||
self._attr_native_value = self.entity_description.value_fn(self.coordinator)
|
||||
|
Loading…
x
Reference in New Issue
Block a user