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

@ -41,10 +41,10 @@ from homeassistant.const import (
PERCENTAGE,
REVOLUTIONS_PER_MINUTE,
TEMP_CELSIUS,
TIME_DAYS,
VOLUME_FLOW_RATE_CUBIC_METERS_PER_HOUR,
UnitOfEnergy,
UnitOfPower,
UnitOfTime,
)
from homeassistant.core import HomeAssistant
import homeassistant.helpers.config_validation as cv
@ -232,7 +232,7 @@ SENSOR_TYPES = (
ComfoconnectSensorEntityDescription(
key=ATTR_DAYS_TO_REPLACE_FILTER,
name="Days to replace filter",
native_unit_of_measurement=TIME_DAYS,
native_unit_of_measurement=UnitOfTime.DAYS,
icon="mdi:calendar",
sensor_id=SENSOR_DAYS_TO_REPLACE_FILTER,
),