Centrally define Energy Units (kWh and Wh) (#21719)
* centralize energy units kWh and Wh * lint
This commit is contained in:
1 parent
c0b859d8da
commit
a99d83390e
19 files changed
+70
-51
No files matched your search
@@ -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',
|
||||
|
||||
Reference in new issue
Block a user