Add device classes in starline (#84049)
This commit is contained in:
parent
9f10bd46ac
commit
2d9095263e
1 changed files with 6 additions and 5 deletions
|
@ -10,10 +10,10 @@ from homeassistant.components.sensor import (
|
|||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
ELECTRIC_POTENTIAL_VOLT,
|
||||
PERCENTAGE,
|
||||
TEMP_CELSIUS,
|
||||
UnitOfElectricPotential,
|
||||
UnitOfLength,
|
||||
UnitOfTemperature,
|
||||
UnitOfVolume,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
@ -43,7 +43,8 @@ SENSOR_TYPES: tuple[StarlineSensorEntityDescription, ...] = (
|
|||
StarlineSensorEntityDescription(
|
||||
key="battery",
|
||||
name_="Battery",
|
||||
native_unit_of_measurement=ELECTRIC_POTENTIAL_VOLT,
|
||||
device_class=SensorDeviceClass.VOLTAGE,
|
||||
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
|
||||
),
|
||||
StarlineSensorEntityDescription(
|
||||
key="balance",
|
||||
|
@ -54,13 +55,13 @@ SENSOR_TYPES: tuple[StarlineSensorEntityDescription, ...] = (
|
|||
key="ctemp",
|
||||
name_="Interior Temperature",
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
native_unit_of_measurement=TEMP_CELSIUS,
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
),
|
||||
StarlineSensorEntityDescription(
|
||||
key="etemp",
|
||||
name_="Engine Temperature",
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
native_unit_of_measurement=TEMP_CELSIUS,
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
),
|
||||
StarlineSensorEntityDescription(
|
||||
key="gsm_lvl",
|
||||
|
|
Loading…
Add table
Reference in a new issue