Add and use UNIT_VOLT constant (#33994)
* Add and use UNIT_VOLT constant * Run isort
This commit is contained in:
parent
32e87fc4c7
commit
04c4501455
22 changed files with 125 additions and 64 deletions
|
@ -1,6 +1,6 @@
|
|||
"""Reads vehicle status from StarLine API."""
|
||||
from homeassistant.components.sensor import DEVICE_CLASS_TEMPERATURE
|
||||
from homeassistant.const import TEMP_CELSIUS, UNIT_PERCENTAGE
|
||||
from homeassistant.const import TEMP_CELSIUS, UNIT_PERCENTAGE, UNIT_VOLT
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.helpers.icon import icon_for_battery_level, icon_for_signal_level
|
||||
|
||||
|
@ -9,7 +9,7 @@ from .const import DOMAIN
|
|||
from .entity import StarlineEntity
|
||||
|
||||
SENSOR_TYPES = {
|
||||
"battery": ["Battery", None, "V", None],
|
||||
"battery": ["Battery", None, UNIT_VOLT, None],
|
||||
"balance": ["Balance", None, None, "mdi:cash-multiple"],
|
||||
"ctemp": ["Interior Temperature", DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS, None],
|
||||
"etemp": ["Engine Temperature", DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS, None],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue