mirror of
https://github.com/home-assistant/core.git
synced 2025-11-15 22:10:09 +00:00
Update typing 05 (#48038)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
"""Platform for climate integration."""
|
||||
from typing import List, Optional
|
||||
from __future__ import annotations
|
||||
|
||||
from homeassistant.components.climate import (
|
||||
ATTR_TEMPERATURE,
|
||||
@@ -45,7 +45,7 @@ class DevoloClimateDeviceEntity(DevoloMultiLevelSwitchDeviceEntity, ClimateEntit
|
||||
"""Representation of a climate/thermostat device within devolo Home Control."""
|
||||
|
||||
@property
|
||||
def current_temperature(self) -> Optional[float]:
|
||||
def current_temperature(self) -> float | None:
|
||||
"""Return the current temperature."""
|
||||
if hasattr(self._device_instance, "multi_level_sensor_property"):
|
||||
return next(
|
||||
@@ -60,7 +60,7 @@ class DevoloClimateDeviceEntity(DevoloMultiLevelSwitchDeviceEntity, ClimateEntit
|
||||
return None
|
||||
|
||||
@property
|
||||
def target_temperature(self) -> Optional[float]:
|
||||
def target_temperature(self) -> float | None:
|
||||
"""Return the target temperature."""
|
||||
return self._value
|
||||
|
||||
@@ -75,7 +75,7 @@ class DevoloClimateDeviceEntity(DevoloMultiLevelSwitchDeviceEntity, ClimateEntit
|
||||
return HVAC_MODE_HEAT
|
||||
|
||||
@property
|
||||
def hvac_modes(self) -> List[str]:
|
||||
def hvac_modes(self) -> list[str]:
|
||||
"""Return the list of available hvac operation modes."""
|
||||
return [HVAC_MODE_HEAT]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user