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
@@ -7,7 +7,8 @@ from homeassistant.components.fritzbox import DOMAIN as FRITZBOX_DOMAIN
|
||||
from homeassistant.components.fritzbox import (
|
||||
ATTR_STATE_DEVICE_LOCKED, ATTR_STATE_LOCKED)
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS
|
||||
from homeassistant.const import (ATTR_TEMPERATURE, TEMP_CELSIUS,
|
||||
ENERGY_KILO_WATT_HOUR)
|
||||
|
||||
DEPENDENCIES = ['fritzbox']
|
||||
|
||||
@@ -15,7 +16,7 @@ _LOGGER = logging.getLogger(__name__)
|
||||
|
||||
ATTR_TOTAL_CONSUMPTION = 'total_consumption'
|
||||
ATTR_TOTAL_CONSUMPTION_UNIT = 'total_consumption_unit'
|
||||
ATTR_TOTAL_CONSUMPTION_UNIT_VALUE = 'kWh'
|
||||
ATTR_TOTAL_CONSUMPTION_UNIT_VALUE = ENERGY_KILO_WATT_HOUR
|
||||
|
||||
ATTR_TEMPERATURE_UNIT = 'temperature_unit'
|
||||
|
||||
|
||||
Reference in new issue
Block a user