Add and use percentage constant (#32094)

* Add and use percentage constant

* Fix pylint error and broken test
This commit is contained in:
springstan authored and GitHub committed 2020-02-28 11:46:48 -08:00
1 parent c7f128f286
commit f1a0ca7cd3
155 files changed
+735 -459

No files matched your search

+5 -4
View File
@@ -7,13 +7,14 @@ from homeassistant.const import (
POWER_WATT,
TEMP_CELSIUS,
TEMP_FAHRENHEIT,
UNIT_PERCENTAGE,
)
SENSORS = {
"V_TEMP": [None, "mdi:thermometer"],
"V_HUM": ["%", "mdi:water-percent"],
"V_DIMMER": ["%", "mdi:percent"],
"V_PERCENTAGE": ["%", "mdi:percent"],
"V_HUM": [UNIT_PERCENTAGE, "mdi:water-percent"],
"V_DIMMER": [UNIT_PERCENTAGE, "mdi:percent"],
"V_PERCENTAGE": [UNIT_PERCENTAGE, "mdi:percent"],
"V_PRESSURE": [None, "mdi:gauge"],
"V_FORECAST": [None, "mdi:weather-partly-cloudy"],
"V_RAIN": [None, "mdi:weather-rainy"],
@@ -26,7 +27,7 @@ SENSORS = {
"V_IMPEDANCE": ["ohm", None],
"V_WATT": [POWER_WATT, None],
"V_KWH": [ENERGY_KILO_WATT_HOUR, None],
"V_LIGHT_LEVEL": ["%", "mdi:white-balance-sunny"],
"V_LIGHT_LEVEL": [UNIT_PERCENTAGE, "mdi:white-balance-sunny"],
"V_FLOW": ["m", "mdi:gauge"],
"V_VOLUME": ["m³", None],
"V_LEVEL": {