Update typing 05 (#48038)

This commit is contained in:
Marc Mueller 2021-03-17 23:43:55 +01:00 committed by GitHub
parent 76199c0eb2
commit 7c0734bdd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
57 changed files with 315 additions and 251 deletions

View file

@ -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]