Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion custom_components/comfoconnect/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,4 @@ def _handle_update(self, value):
)

self._attr_is_on = True if value else False
self.schedule_update_ha_state()
self.async_write_ha_state()
4 changes: 2 additions & 2 deletions custom_components/comfoconnect/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def _handle_speed_update(self, value: int) -> None:
else:
self._attr_percentage = ordered_list_item_to_percentage(FAN_SPEEDS, FAN_SPEED_MAPPING[value])

self.schedule_update_ha_state()
self.async_write_ha_state()

def _handle_mode_update(self, value: int) -> None:
"""Handle update callbacks."""
Expand All @@ -109,7 +109,7 @@ def _handle_mode_update(self, value: int) -> None:
value,
)
self._attr_preset_mode = VentilationMode.AUTO if value == -1 else VentilationMode.MANUAL
self.schedule_update_ha_state()
self.async_write_ha_state()

@property
def is_on(self) -> bool | None:
Expand Down
4 changes: 2 additions & 2 deletions custom_components/comfoconnect/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def _handle_update(self, value):
)

self._attr_current_option = self.entity_description.sensor_value_fn(value)
self.schedule_update_ha_state()
self.async_write_ha_state()

async def async_update(self) -> None:
"""Update the state."""
Expand All @@ -222,4 +222,4 @@ async def async_select_option(self, option: str) -> None:
"""Set the selected option."""
await self.entity_description.set_value_fn(self._ccb, option)
self._attr_current_option = option
self.schedule_update_ha_state()
self.async_write_ha_state()
2 changes: 1 addition & 1 deletion custom_components/comfoconnect/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,4 +449,4 @@ def _handle_update(self, value):
self._attr_native_value = self.entity_description.mapping(value)
else:
self._attr_native_value = value
self.schedule_update_ha_state()
self.async_write_ha_state()
Loading