Use UnitOfTemperature in climate entities [t-z] (#83129)

This commit is contained in:
epenet 2022-12-05 10:18:57 +01:00 committed by GitHub
parent ee5de654ab
commit c7a6b5983f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 44 additions and 44 deletions

View file

@ -33,8 +33,8 @@ from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
ATTR_TEMPERATURE,
PRECISION_TENTHS,
TEMP_CELSIUS,
Platform,
UnitOfTemperature,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
@ -139,7 +139,7 @@ class Thermostat(ZhaEntity, ClimateEntity):
DEFAULT_MIN_TEMP = 7
_attr_precision = PRECISION_TENTHS
_attr_temperature_unit = TEMP_CELSIUS
_attr_temperature_unit = UnitOfTemperature.CELSIUS
def __init__(self, unique_id, zha_device, channels, **kwargs):
"""Initialize ZHA Thermostat instance."""