Use UnitOfTime in integrations (t-z) (#84291)

This commit is contained in:
epenet 2022-12-20 12:30:14 +01:00 committed by GitHub
parent 1f3da9cf1a
commit fba13dcc90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 50 additions and 56 deletions

View file

@ -15,10 +15,10 @@ from homeassistant.components.sensor import (
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
PERCENTAGE,
TIME_MINUTES,
UnitOfElectricCurrent,
UnitOfElectricPotential,
UnitOfPower,
UnitOfTime,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
@ -437,7 +437,7 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
TuyaSensorEntityDescription(
key=DPCode.REMAIN_TIME,
name="Remaining time",
native_unit_of_measurement=TIME_MINUTES,
native_unit_of_measurement=UnitOfTime.MINUTES,
icon="mdi:timer",
),
),