mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Fix mypy issue in airzone cloud (#132208)
This commit is contained in:
parent
f31ff3ca14
commit
14897f921c
@ -194,12 +194,6 @@ class AirzoneClimate(AirzoneEntity, ClimateEntity):
|
|||||||
ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
|
ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
|
||||||
)
|
)
|
||||||
|
|
||||||
if (
|
|
||||||
self.get_airzone_value(AZD_SPEED) is not None
|
|
||||||
and self.get_airzone_value(AZD_SPEEDS) is not None
|
|
||||||
):
|
|
||||||
self._initialize_fan_speeds()
|
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def _handle_coordinator_update(self) -> None:
|
def _handle_coordinator_update(self) -> None:
|
||||||
"""Update attributes when the coordinator updates."""
|
"""Update attributes when the coordinator updates."""
|
||||||
@ -252,6 +246,15 @@ class AirzoneDeviceClimate(AirzoneClimate):
|
|||||||
_speeds: dict[int, str]
|
_speeds: dict[int, str]
|
||||||
_speeds_reverse: dict[str, int]
|
_speeds_reverse: dict[str, int]
|
||||||
|
|
||||||
|
def _init_attributes(self) -> None:
|
||||||
|
"""Init common climate device attributes."""
|
||||||
|
super()._init_attributes()
|
||||||
|
if (
|
||||||
|
self.get_airzone_value(AZD_SPEED) is not None
|
||||||
|
and self.get_airzone_value(AZD_SPEEDS) is not None
|
||||||
|
):
|
||||||
|
self._initialize_fan_speeds()
|
||||||
|
|
||||||
def _initialize_fan_speeds(self) -> None:
|
def _initialize_fan_speeds(self) -> None:
|
||||||
"""Initialize fan speeds."""
|
"""Initialize fan speeds."""
|
||||||
azd_speeds: dict[int, int] = self.get_airzone_value(AZD_SPEEDS)
|
azd_speeds: dict[int, int] = self.get_airzone_value(AZD_SPEEDS)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user