mirror of
https://github.com/home-assistant/core
synced 2024-08-02 23:40:32 +02:00
Fix Airzone sensor and binary sensor updates (#72025)
airzone: fix sensor and binary sensor updates
This regression was introduced in b9b83c05e9
along with the modifications for the strict typing.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
parent
c3d19f3827
commit
a78f183b64
@ -119,6 +119,12 @@ class AirzoneBinarySensor(AirzoneEntity, BinarySensorEntity):
|
||||
|
||||
entity_description: AirzoneBinarySensorEntityDescription
|
||||
|
||||
@callback
|
||||
def _handle_coordinator_update(self) -> None:
|
||||
"""Update attributes when the coordinator updates."""
|
||||
self._async_update_attrs()
|
||||
super()._handle_coordinator_update()
|
||||
|
||||
@callback
|
||||
def _async_update_attrs(self) -> None:
|
||||
"""Update binary sensor attributes."""
|
||||
|
@ -102,6 +102,12 @@ async def async_setup_entry(
|
||||
class AirzoneSensor(AirzoneEntity, SensorEntity):
|
||||
"""Define an Airzone sensor."""
|
||||
|
||||
@callback
|
||||
def _handle_coordinator_update(self) -> None:
|
||||
"""Update attributes when the coordinator updates."""
|
||||
self._async_update_attrs()
|
||||
super()._handle_coordinator_update()
|
||||
|
||||
@callback
|
||||
def _async_update_attrs(self) -> None:
|
||||
"""Update sensor attributes."""
|
||||
|
Loading…
Reference in New Issue
Block a user