Add new unit types for better type checking (#53124)

* Add new unit types
* Update helper functions
* Update components
* Update lcn climate
This commit is contained in:
Marc Mueller 2021-07-18 14:43:47 +02:00 committed by GitHub
parent 78f4a49b73
commit 71a8ae3016
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 254 additions and 152 deletions

View file

@ -11,7 +11,7 @@ from homeassistant.components.climate import (
ClimateEntity,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import PRECISION_HALVES, PRECISION_TENTHS
from homeassistant.const import PRECISION_HALVES, PRECISION_TENTHS, UnitTemperatureT
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
@ -105,7 +105,7 @@ class DevoloClimateDeviceEntity(DevoloMultiLevelSwitchDeviceEntity, ClimateEntit
return SUPPORT_TARGET_TEMPERATURE
@property
def temperature_unit(self) -> str:
def temperature_unit(self) -> UnitTemperatureT:
"""Return the supported unit of temperature."""
return TEMP_CELSIUS