1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

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

* centralize energy units kWh and Wh

* lint
This commit is contained in:
Diogo Gomes
2019-03-13 01:46:41 +00:00
committed by Robbie Trencheny
parent c0b859d8da
commit a99d83390e
19 changed files with 70 additions and 51 deletions

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]
}