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

@ -18,7 +18,7 @@ from homeassistant.const import (
CONF_API_KEY,
CONF_MONITORED_CONDITIONS,
CONF_SCAN_INTERVAL,
TIME_SECONDS,
UnitOfTime,
)
from homeassistant.core import HomeAssistant
import homeassistant.helpers.config_validation as cv
@ -43,7 +43,7 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
SensorEntityDescription(
key="last_build_duration",
name="Last Build Duration",
native_unit_of_measurement=TIME_SECONDS,
native_unit_of_measurement=UnitOfTime.SECONDS,
icon="mdi:timelapse",
),
SensorEntityDescription(