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:
parent
78f4a49b73
commit
71a8ae3016
15 changed files with 254 additions and 152 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue