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
@@ -4,7 +4,7 @@ from datetime import timedelta
|
||||
|
||||
from homeassistant.components.smappee import DATA_SMAPPEE
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.const import POWER_WATT
|
||||
from homeassistant.const import POWER_WATT, ENERGY_KILO_WATT_HOUR
|
||||
|
||||
DEPENDENCIES = ['smappee']
|
||||
|
||||
@@ -24,11 +24,14 @@ SENSOR_TYPES = {
|
||||
'active_cosfi':
|
||||
['Power Factor', 'mdi:gauge', 'local', '%', 'active_cosfi'],
|
||||
'alwayson_today':
|
||||
['Always On Today', 'mdi:gauge', 'remote', 'kWh', 'alwaysOn'],
|
||||
['Always On Today', 'mdi:gauge', 'remote', ENERGY_KILO_WATT_HOUR,
|
||||
'alwaysOn'],
|
||||
'solar_today':
|
||||
['Solar Today', 'mdi:white-balance-sunny', 'remote', 'kWh', 'solar'],
|
||||
['Solar Today', 'mdi:white-balance-sunny', 'remote',
|
||||
ENERGY_KILO_WATT_HOUR, 'solar'],
|
||||
'power_today':
|
||||
['Power Today', 'mdi:power-plug', 'remote', 'kWh', 'consumption'],
|
||||
['Power Today', 'mdi:power-plug', 'remote', ENERGY_KILO_WATT_HOUR,
|
||||
'consumption'],
|
||||
'water_sensor_1':
|
||||
['Water Sensor 1', 'mdi:water', 'water', 'm3', 'value1'],
|
||||
'water_sensor_2':
|
||||
|
||||
Reference in new issue
Block a user