Use UnitOfTime in integrations (h-s) (#84289)
This commit is contained in:
parent
6a8d9a91cb
commit
55a5e17cf2
24 changed files with 64 additions and 75 deletions
|
@ -18,7 +18,7 @@ from homeassistant.components.sensor import (
|
|||
SensorEntityDescription,
|
||||
SensorStateClass,
|
||||
)
|
||||
from homeassistant.const import SIGNAL_STRENGTH_DECIBELS_MILLIWATT, TIME_SECONDS
|
||||
from homeassistant.const import SIGNAL_STRENGTH_DECIBELS_MILLIWATT, UnitOfTime
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity import EntityCategory
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
@ -32,7 +32,7 @@ SENSOR_DESCRIPTIONS: dict[str, SensorEntityDescription] = {
|
|||
key=OralBSensor.TIME,
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||
native_unit_of_measurement=TIME_SECONDS,
|
||||
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||
),
|
||||
OralBSensor.SECTOR: SensorEntityDescription(
|
||||
key=OralBSensor.SECTOR,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue