mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Adjust hvac_modes type hint in ClimateEntity (#70657)
* Adjust hvac_modes type hint in ClimateEntity * Adjust tuya
This commit is contained in:
parent
28ebab9c5a
commit
d22a679262
@ -191,7 +191,7 @@ class ClimateEntity(Entity):
|
||||
_attr_fan_modes: list[str] | None
|
||||
_attr_hvac_action: HVACAction | str | None = None
|
||||
_attr_hvac_mode: HVACMode | str | None
|
||||
_attr_hvac_modes: list[HVACMode | str]
|
||||
_attr_hvac_modes: list[HVACMode] | list[str]
|
||||
_attr_is_aux_heat: bool | None
|
||||
_attr_max_humidity: int = DEFAULT_MAX_HUMIDITY
|
||||
_attr_max_temp: float
|
||||
@ -341,7 +341,7 @@ class ClimateEntity(Entity):
|
||||
return self._attr_hvac_mode
|
||||
|
||||
@property
|
||||
def hvac_modes(self) -> list[HVACMode | str]:
|
||||
def hvac_modes(self) -> list[HVACMode] | list[str]:
|
||||
"""Return the list of available hvac operation modes."""
|
||||
return self._attr_hvac_modes
|
||||
|
||||
|
@ -207,7 +207,7 @@ class TuyaClimateEntity(TuyaEntity, ClimateEntity):
|
||||
self._attr_target_temperature_step = self._set_temperature.step_scaled
|
||||
|
||||
# Determine HVAC modes
|
||||
self._attr_hvac_modes = []
|
||||
self._attr_hvac_modes: list[str] = []
|
||||
self._hvac_to_tuya = {}
|
||||
if enum_type := self.find_dpcode(
|
||||
DPCode.MODE, dptype=DPType.ENUM, prefer_function=True
|
||||
|
Loading…
x
Reference in New Issue
Block a user