Use UnitOfLength in integrations (#84034)
This commit is contained in:
parent
bf4c399b19
commit
d72c28a135
30 changed files with 106 additions and 119 deletions
|
@ -11,9 +11,9 @@ from homeassistant.components.sensor import (
|
|||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
ELECTRIC_POTENTIAL_VOLT,
|
||||
LENGTH_KILOMETERS,
|
||||
PERCENTAGE,
|
||||
TEMP_CELSIUS,
|
||||
UnitOfLength,
|
||||
UnitOfVolume,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
@ -80,7 +80,7 @@ SENSOR_TYPES: tuple[StarlineSensorEntityDescription, ...] = (
|
|||
StarlineSensorEntityDescription(
|
||||
key="mileage",
|
||||
name_="Mileage",
|
||||
native_unit_of_measurement=LENGTH_KILOMETERS,
|
||||
native_unit_of_measurement=UnitOfLength.KILOMETERS,
|
||||
device_class=SensorDeviceClass.DISTANCE,
|
||||
icon="mdi:counter",
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue