Device: Kasa KE100 TRV (fw 2.10.0) on a KH100 hub, battery at 5%.
TemperatureControl.mode logs Got unknown state: set() on every update and returns ThermostatState.Unknown, so Home Assistant shows the TRV as off ("Unknown thermostat state, defaulting to OFF").
Cause: when trv_states == ["low_battery"], the empty-check runs before low_battery is discarded:
states = self.states
if not states: # {"low_battery"} is not empty
return ThermostatState.Idle
states.discard("low_battery") # now empty
...
_LOGGER.warning("Got unknown state: %s", states) # "set()"
return ThermostatState.Unknown
Moving the discard("low_battery") above the empty-check would return Idle as intended (the battery state is already exposed separately).
Activity
rytilahti commented on Oct 12, 2026
Hi @TangiblePear, this is likely already fixed in the next release (#1598), please update and re-open if this is still an issue, thanks!