Centrally define Energy Units (kWh and Wh) (#21719)

* centralize energy units kWh and Wh

* lint
This commit is contained in:
Diogo Gomes authored and Robbie Trencheny committed 2019-03-12 18:46:41 -07:00
1 parent c0b859d8da
commit a99d83390e
19 files changed
+70 -51

No files matched your search

+3 -2
View File
@@ -1,7 +1,8 @@
"""Support for MySensors sensors."""
from homeassistant.components import mysensors
from homeassistant.components.sensor import DOMAIN
from homeassistant.const import TEMP_CELSIUS, TEMP_FAHRENHEIT, POWER_WATT
from homeassistant.const import (TEMP_CELSIUS, TEMP_FAHRENHEIT, POWER_WATT,
ENERGY_KILO_WATT_HOUR)
SENSORS = {
'V_TEMP': [None, 'mdi:thermometer'],
@@ -13,7 +14,7 @@ SENSORS = {
'V_DISTANCE': ['m', 'mdi:ruler'],
'V_IMPEDANCE': ['ohm', None],
'V_WATT': [POWER_WATT, None],
'V_KWH': ['kWh', None],
'V_KWH': [ENERGY_KILO_WATT_HOUR, None],
'V_FLOW': ['m', None],
'V_VOLUME': ['m³', None],
'V_VOLTAGE': ['V', 'mdi:flash'],