Fix HAVCMode typing in Genius Hub (#94640)

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

View File

@ -66,12 +66,12 @@ class GeniusClimateZone(GeniusHeatingZone, ClimateEntity):
return "mdi:radiator" return "mdi:radiator"
@property @property
def hvac_mode(self) -> str: def hvac_mode(self) -> HVACMode:
"""Return hvac operation ie. heat, cool mode.""" """Return hvac operation ie. heat, cool mode."""
return GH_HVAC_TO_HA.get(self._zone.data["mode"], HVACMode.HEAT) return GH_HVAC_TO_HA.get(self._zone.data["mode"], HVACMode.HEAT)
@property @property
def hvac_modes(self) -> list[str]: def hvac_modes(self) -> list[HVACMode]:
"""Return the list of available hvac operation modes.""" """Return the list of available hvac operation modes."""
return list(HA_HVAC_TO_GH) return list(HA_HVAC_TO_GH)