Add and use UNIT_CONDUCTIVITY constant (#34107)

This commit is contained in:
springstan
2020-04-12 21:26:20 +02:00
committed by GitHub
parent 44afffcfbf
commit 538bb60022
5 changed files with 25 additions and 8 deletions

View File

@@ -18,6 +18,7 @@ from homeassistant.const import (
EVENT_HOMEASSISTANT_START,
TEMP_CELSIUS,
TEMP_FAHRENHEIT,
UNIT_CONDUCTIVITY,
UNIT_PERCENTAGE,
)
from homeassistant.core import callback
@@ -54,7 +55,7 @@ SENSOR_TYPES = {
"temperature": ["Temperature", TEMP_CELSIUS, "mdi:thermometer"],
"light": ["Light intensity", "lx", "mdi:white-balance-sunny"],
"moisture": ["Moisture", UNIT_PERCENTAGE, "mdi:water-percent"],
"conductivity": ["Conductivity", "µS/cm", "mdi:flash-circle"],
"conductivity": ["Conductivity", UNIT_CONDUCTIVITY, "mdi:flash-circle"],
"battery": ["Battery", UNIT_PERCENTAGE, "mdi:battery-charging"],
}