Fix HAVCMode typing in Honeywell Total Connect Comfort (#94636)

This commit is contained in:
Franck Nijhof 2023-06-15 14:07:41 +02:00 committed by GitHub
parent e49f1b002f
commit b1abe6812b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,7 +131,7 @@ class EvoClimateEntity(EvoDevice, ClimateEntity):
_attr_temperature_unit = UnitOfTemperature.CELSIUS
@property
def hvac_modes(self) -> list[str]:
def hvac_modes(self) -> list[HVACMode]:
"""Return a list of available hvac operation modes."""
return list(HA_HVAC_TO_TCS)
@ -191,7 +191,7 @@ class EvoZone(EvoChild, EvoClimateEntity):
)
@property
def hvac_mode(self) -> str:
def hvac_mode(self) -> HVACMode:
"""Return the current operating mode of a Zone."""
if self._evo_tcs.systemModeStatus["mode"] in (EVO_AWAY, EVO_HEATOFF):
return HVACMode.AUTO
@ -356,7 +356,7 @@ class EvoController(EvoClimateEntity):
)
@property
def hvac_mode(self) -> str:
def hvac_mode(self) -> HVACMode:
"""Return the current operating mode of a Controller."""
tcs_mode = self._evo_tcs.systemModeStatus["mode"]
return HVACMode.OFF if tcs_mode == EVO_HEATOFF else HVACMode.HEAT