1
0
mirror of https://github.com/home-assistant/core.git synced 2026-04-02 08:26:41 +01:00

Improve type hints in ecobee climate (#165178)

This commit is contained in:
epenet
2026-03-09 09:16:43 +01:00
committed by GitHub
parent 6067be6f49
commit 237a0ae03f

View File

@@ -490,14 +490,14 @@ class Thermostat(ClimateEntity):
return None
@property
def fan(self):
def fan(self) -> str:
"""Return the current fan status."""
if "fan" in self.thermostat["equipmentStatus"]:
return STATE_ON
return STATE_OFF
@property
def fan_mode(self):
def fan_mode(self) -> str:
"""Return the fan setting."""
return self.thermostat["runtime"]["desiredFanMode"]
@@ -535,7 +535,7 @@ class Thermostat(ClimateEntity):
return None
@property
def hvac_mode(self):
def hvac_mode(self) -> HVACMode:
"""Return current operation."""
return ECOBEE_HVAC_TO_HASS[self.settings["hvacMode"]]
@@ -548,7 +548,7 @@ class Thermostat(ClimateEntity):
return None
@property
def hvac_action(self):
def hvac_action(self) -> HVACAction:
"""Return current HVAC action.
Ecobee returns a CSV string with different equipment that is active.