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 Franck Nijhof
parent c399fe2837
commit 791dc5809f

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
@ -10,8 +11,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],
}