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

+2 -2
View File
@@ -2,7 +2,7 @@
import logging
from homeassistant.components.homematic import ATTR_DISCOVER_DEVICES, HMDevice
from homeassistant.const import STATE_UNKNOWN, POWER_WATT
from homeassistant.const import STATE_UNKNOWN, POWER_WATT, ENERGY_WATT_HOUR
_LOGGER = logging.getLogger(__name__)
@@ -27,7 +27,7 @@ HM_UNIT_HA_CAST = {
'POWER': POWER_WATT,
'CURRENT': 'mA',
'VOLTAGE': 'V',
'ENERGY_COUNTER': 'Wh',
'ENERGY_COUNTER': ENERGY_WATT_HOUR,
'GAS_POWER': 'm3',
'GAS_ENERGY_COUNTER': 'm3',
'LUX': 'lx',