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

@@ -14,7 +14,7 @@ import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_USERNAME, CONF_PASSWORD,
CONF_USERNAME, CONF_PASSWORD, ENERGY_KILO_WATT_HOUR,
CONF_NAME, CONF_MONITORED_VARIABLES, TEMP_CELSIUS)
from homeassistant.helpers.entity import Entity
from homeassistant.util import Throttle
@@ -24,7 +24,7 @@ REQUIREMENTS = ['pyhydroquebec==2.2.2']
_LOGGER = logging.getLogger(__name__)
KILOWATT_HOUR = 'kWh' # type: str
KILOWATT_HOUR = ENERGY_KILO_WATT_HOUR
PRICE = 'CAD' # type: str
DAYS = 'days' # type: str
CONF_CONTRACT = 'contract' # type: str