Fix unit_of_measurement for Starline temperature sensors (#29740)

This commit is contained in:
Nikolay Vasilchuk 2019-12-09 12:56:57 +03:00 committed by Paulus Schoutsen
parent f7015703bb
commit 70fe5d3238

View File

@ -1,5 +1,6 @@
"""Reads vehicle status from StarLine API."""
from homeassistant.components.sensor import DEVICE_CLASS_TEMPERATURE
from homeassistant.const import TEMP_CELSIUS
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.icon import icon_for_battery_level, icon_for_signal_level
from .account import StarlineAccount, StarlineDevice
@ -9,8 +10,8 @@ from .entity import StarlineEntity
SENSOR_TYPES = {
"battery": ["Battery", None, "V", None],
"balance": ["Balance", None, None, "mdi:cash-multiple"],
"ctemp": ["Interior Temperature", DEVICE_CLASS_TEMPERATURE, None, None],
"etemp": ["Engine Temperature", DEVICE_CLASS_TEMPERATURE, None, None],
"ctemp": ["Interior Temperature", DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS, None],
"etemp": ["Engine Temperature", DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS, None],
"gsm_lvl": ["GSM Signal", None, "%", None],
}