diff --git a/homeassistant/components/overkiz/climate_entities/atlantic_electrical_heater_with_adjustable_temperature_setpoint.py b/homeassistant/components/overkiz/climate_entities/atlantic_electrical_heater_with_adjustable_temperature_setpoint.py index d79d2fca686..5807ccecd74 100644 --- a/homeassistant/components/overkiz/climate_entities/atlantic_electrical_heater_with_adjustable_temperature_setpoint.py +++ b/homeassistant/components/overkiz/climate_entities/atlantic_electrical_heater_with_adjustable_temperature_setpoint.py @@ -45,7 +45,7 @@ OVERKIZ_TO_PRESET_MODE: dict[str, str] = { PRESET_MODE_TO_OVERKIZ = {v: k for k, v in OVERKIZ_TO_PRESET_MODE.items()} # Map Overkiz HVAC modes to Home Assistant HVAC modes -OVERKIZ_TO_HVAC_MODE: dict[str, str] = { +OVERKIZ_TO_HVAC_MODE: dict[str, HVACMode] = { OverkizCommandParam.ON: HVACMode.HEAT, OverkizCommandParam.OFF: HVACMode.OFF, OverkizCommandParam.AUTO: HVACMode.AUTO, @@ -83,7 +83,7 @@ class AtlanticElectricalHeaterWithAdjustableTemperatureSetpoint( ) @property - def hvac_mode(self) -> str: + def hvac_mode(self) -> HVACMode: """Return hvac operation ie. heat, cool mode.""" states = self.device.states if (state := states[OverkizState.CORE_OPERATING_MODE]) and state.value_as_str: diff --git a/homeassistant/components/overkiz/climate_entities/atlantic_electrical_towel_dryer.py b/homeassistant/components/overkiz/climate_entities/atlantic_electrical_towel_dryer.py index c8e4920a113..0c378d088c5 100644 --- a/homeassistant/components/overkiz/climate_entities/atlantic_electrical_towel_dryer.py +++ b/homeassistant/components/overkiz/climate_entities/atlantic_electrical_towel_dryer.py @@ -20,7 +20,7 @@ from ..entity import OverkizEntity PRESET_DRYING = "drying" -OVERKIZ_TO_HVAC_MODE: dict[str, str] = { +OVERKIZ_TO_HVAC_MODE: dict[str, HVACMode] = { OverkizCommandParam.EXTERNAL: HVACMode.HEAT, # manu OverkizCommandParam.INTERNAL: HVACMode.AUTO, # prog OverkizCommandParam.STANDBY: HVACMode.OFF, @@ -62,7 +62,7 @@ class AtlanticElectricalTowelDryer(OverkizEntity, ClimateEntity): self._attr_supported_features |= ClimateEntityFeature.PRESET_MODE @property - def hvac_mode(self) -> str: + def hvac_mode(self) -> HVACMode: """Return hvac operation ie. heat, cool mode.""" if OverkizState.CORE_OPERATING_MODE in self.device.states: return OVERKIZ_TO_HVAC_MODE[ @@ -71,7 +71,7 @@ class AtlanticElectricalTowelDryer(OverkizEntity, ClimateEntity): return HVACMode.OFF - async def async_set_hvac_mode(self, hvac_mode: str) -> None: + async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None: """Set new target hvac mode.""" await self.executor.async_execute_command( OverkizCommand.SET_TOWEL_DRYER_OPERATING_MODE, diff --git a/homeassistant/components/overkiz/climate_entities/atlantic_pass_apc_heating_zone.py b/homeassistant/components/overkiz/climate_entities/atlantic_pass_apc_heating_zone.py index b6835d93ebb..7722269a48b 100644 --- a/homeassistant/components/overkiz/climate_entities/atlantic_pass_apc_heating_zone.py +++ b/homeassistant/components/overkiz/climate_entities/atlantic_pass_apc_heating_zone.py @@ -21,7 +21,7 @@ from ..const import DOMAIN from ..coordinator import OverkizDataUpdateCoordinator from ..entity import OverkizEntity -OVERKIZ_TO_HVAC_MODE: dict[str, str] = { +OVERKIZ_TO_HVAC_MODE: dict[str, HVACMode] = { OverkizCommandParam.AUTO: HVACMode.AUTO, OverkizCommandParam.ECO: HVACMode.AUTO, OverkizCommandParam.MANU: HVACMode.HEAT, @@ -101,7 +101,7 @@ class AtlanticPassAPCHeatingZone(OverkizEntity, ClimateEntity): return None @property - def hvac_mode(self) -> str: + def hvac_mode(self) -> HVACMode: """Return hvac operation ie. heat, cool mode.""" return OVERKIZ_TO_HVAC_MODE[ cast(str, self.executor.select_state(OverkizState.IO_PASS_APC_HEATING_MODE)) @@ -135,7 +135,7 @@ class AtlanticPassAPCHeatingZone(OverkizEntity, ClimateEntity): OverkizCommand.REFRESH_PASS_APC_HEATING_PROFILE ) - async def async_set_hvac_mode(self, hvac_mode: str) -> None: + async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None: """Set new target hvac mode.""" await self.async_set_heating_mode(HVAC_MODE_TO_OVERKIZ[hvac_mode]) diff --git a/homeassistant/components/overkiz/climate_entities/atlantic_pass_apc_zone_control.py b/homeassistant/components/overkiz/climate_entities/atlantic_pass_apc_zone_control.py index 33c1f0c4a2a..74f7637b997 100644 --- a/homeassistant/components/overkiz/climate_entities/atlantic_pass_apc_zone_control.py +++ b/homeassistant/components/overkiz/climate_entities/atlantic_pass_apc_zone_control.py @@ -8,7 +8,7 @@ from homeassistant.const import UnitOfTemperature from ..entity import OverkizEntity -OVERKIZ_TO_HVAC_MODE: dict[str, str] = { +OVERKIZ_TO_HVAC_MODE: dict[str, HVACMode] = { OverkizCommandParam.HEATING: HVACMode.HEAT, OverkizCommandParam.DRYING: HVACMode.DRY, OverkizCommandParam.COOLING: HVACMode.COOL, @@ -25,7 +25,7 @@ class AtlanticPassAPCZoneControl(OverkizEntity, ClimateEntity): _attr_temperature_unit = UnitOfTemperature.CELSIUS @property - def hvac_mode(self) -> str: + def hvac_mode(self) -> HVACMode: """Return hvac operation ie. heat, cool mode.""" return OVERKIZ_TO_HVAC_MODE[ cast( @@ -33,7 +33,7 @@ class AtlanticPassAPCZoneControl(OverkizEntity, ClimateEntity): ) ] - async def async_set_hvac_mode(self, hvac_mode: str) -> None: + async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None: """Set new target hvac mode.""" await self.executor.async_execute_command( OverkizCommand.SET_PASS_APC_OPERATING_MODE, HVAC_MODE_TO_OVERKIZ[hvac_mode] diff --git a/homeassistant/components/overkiz/climate_entities/somfy_thermostat.py b/homeassistant/components/overkiz/climate_entities/somfy_thermostat.py index aaae64e0454..7409b5307cf 100644 --- a/homeassistant/components/overkiz/climate_entities/somfy_thermostat.py +++ b/homeassistant/components/overkiz/climate_entities/somfy_thermostat.py @@ -74,7 +74,7 @@ class SomfyThermostat(OverkizEntity, ClimateEntity): ) @property - def hvac_mode(self) -> str: + def hvac_mode(self) -> HVACMode: """Return hvac operation ie. heat, cool mode.""" return OVERKIZ_TO_HVAC_MODES[ cast(