- I’m writing an integration for my A/C, whose available
fan_modes
depend on the currenthvac_mode
. - My
fan_modes
property is written accordingly:
@property
def fan_modes(self) -> list[str] | None:
details = self.__current_mode_details
allowed_ha_fan_speeds = ...
_LOG.debug(
"Allowed fan speeds in mode %r: %r", details.mode, allowed_ha_fan_speeds
)
return allowed_ha_fan_speeds
- When I change modes, I
self.async_write_ha_state()
; however, my availablefan_modes
don’t seem to update until a few seconds later, when theDataUpdateCoordinator
echoes the new state back from the cloud. - I can’t see anything special in
DataUpdateCoordinator
that would trigger the reevaluation offan_speeds
, but it happens.
Can anyone guide me on how to get my fan_modes
reevaluated more quickly, so that when I change my hvac_mode
, I can immediately see the correct fan_modes
in the adjacent dropdown instead of having to wait a few seconds?