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
|
@ -11,7 +11,7 @@ from homeassistant.components.sensor import (
|
|||
SensorStateClass,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import TIME_MILLISECONDS, UnitOfDataRate
|
||||
from homeassistant.const import UnitOfDataRate, UnitOfTime
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.device_registry import DeviceEntryType
|
||||
from homeassistant.helpers.entity import DeviceInfo
|
||||
|
@ -45,7 +45,7 @@ SENSOR_TYPES: tuple[SpeedtestSensorEntityDescription, ...] = (
|
|||
SpeedtestSensorEntityDescription(
|
||||
key="ping",
|
||||
name="Ping",
|
||||
native_unit_of_measurement=TIME_MILLISECONDS,
|
||||
native_unit_of_measurement=UnitOfTime.MILLISECONDS,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SpeedtestSensorEntityDescription(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue