mirror of
https://github.com/home-assistant/core.git
synced 2026-04-18 07:56:03 +01:00
Improve type hints in ecobee climate (#165178)
This commit is contained in:
@@ -490,14 +490,14 @@ class Thermostat(ClimateEntity):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def fan(self):
|
def fan(self) -> str:
|
||||||
"""Return the current fan status."""
|
"""Return the current fan status."""
|
||||||
if "fan" in self.thermostat["equipmentStatus"]:
|
if "fan" in self.thermostat["equipmentStatus"]:
|
||||||
return STATE_ON
|
return STATE_ON
|
||||||
return STATE_OFF
|
return STATE_OFF
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def fan_mode(self):
|
def fan_mode(self) -> str:
|
||||||
"""Return the fan setting."""
|
"""Return the fan setting."""
|
||||||
return self.thermostat["runtime"]["desiredFanMode"]
|
return self.thermostat["runtime"]["desiredFanMode"]
|
||||||
|
|
||||||
@@ -535,7 +535,7 @@ class Thermostat(ClimateEntity):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def hvac_mode(self):
|
def hvac_mode(self) -> HVACMode:
|
||||||
"""Return current operation."""
|
"""Return current operation."""
|
||||||
return ECOBEE_HVAC_TO_HASS[self.settings["hvacMode"]]
|
return ECOBEE_HVAC_TO_HASS[self.settings["hvacMode"]]
|
||||||
|
|
||||||
@@ -548,7 +548,7 @@ class Thermostat(ClimateEntity):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def hvac_action(self):
|
def hvac_action(self) -> HVACAction:
|
||||||
"""Return current HVAC action.
|
"""Return current HVAC action.
|
||||||
|
|
||||||
Ecobee returns a CSV string with different equipment that is active.
|
Ecobee returns a CSV string with different equipment that is active.
|
||||||
|
|||||||
Reference in New Issue
Block a user