Use UnitOfTime in integrations (a-g) (#84288)

This commit is contained in:
epenet 2022-12-20 13:22:20 +01:00 committed by GitHub
parent 55a5e17cf2
commit 68857dc272
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 73 additions and 93 deletions

View file

@ -26,8 +26,8 @@ from homeassistant.const import (
CONCENTRATION_PARTS_PER_MILLION,
PERCENTAGE,
TEMP_CELSIUS,
TIME_SECONDS,
UnitOfPressure,
UnitOfTime,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import DeviceInfo
@ -75,7 +75,7 @@ SENSOR_DESCRIPTIONS = {
key="update_interval",
name="Update Interval",
device_class=SensorDeviceClass.DURATION,
native_unit_of_measurement=TIME_SECONDS,
native_unit_of_measurement=UnitOfTime.SECONDS,
state_class=SensorStateClass.MEASUREMENT,
# The interval setting is not a generally useful entity for most users.
entity_registry_enabled_default=False,