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
@@ -1,7 +1,7 @@
"""Support for monitoring juicenet/juicepoint/juicebox based EVSE sensors."""
import logging
from homeassistant.const import TEMP_CELSIUS, POWER_WATT
from homeassistant.const import TEMP_CELSIUS, POWER_WATT, ENERGY_WATT_HOUR
from homeassistant.helpers.entity import Entity
from homeassistant.components.juicenet import JuicenetDevice, DOMAIN
@@ -16,7 +16,7 @@ SENSOR_TYPES = {
'amps': ['Amps', 'A'],
'watts': ['Watts', POWER_WATT],
'charge_time': ['Charge time', 's'],
'energy_added': ['Energy added', 'Wh']
'energy_added': ['Energy added', ENERGY_WATT_HOUR]
}