From 908f3386e71295a3b102db369439bb7beadbe969 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 15 Jun 2023 14:12:11 +0200 Subject: [PATCH] Fix HAVCMode typing in ESPHome (#94630) --- homeassistant/components/esphome/climate.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/esphome/climate.py b/homeassistant/components/esphome/climate.py index e40df234d58..b01e89ec2c8 100644 --- a/homeassistant/components/esphome/climate.py +++ b/homeassistant/components/esphome/climate.py @@ -152,7 +152,7 @@ class EsphomeClimateEntity(EsphomeEntity[ClimateInfo, ClimateState], ClimateEnti return PRECISION_TENTHS @property - def hvac_modes(self) -> list[str]: + def hvac_modes(self) -> list[HVACMode]: """Return the list of available operation modes.""" return [ _CLIMATE_MODES.from_esphome(mode) @@ -217,13 +217,13 @@ class EsphomeClimateEntity(EsphomeEntity[ClimateInfo, ClimateState], ClimateEnti @property @esphome_state_property - def hvac_mode(self) -> str | None: + def hvac_mode(self) -> HVACMode | None: """Return current operation ie. heat, cool, idle.""" return _CLIMATE_MODES.from_esphome(self._state.mode) @property @esphome_state_property - def hvac_action(self) -> str | None: + def hvac_action(self) -> HVACAction | None: """Return current action.""" # HA has no support feature field for hvac_action if not self._static_info.supports_action: