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,4 +1,6 @@
"""Constants for ebus component."""
from homeassistant.const import ENERGY_KILO_WATT_HOUR
DOMAIN = 'ebusd'
# SensorTypes:
@@ -67,9 +69,9 @@ SENSOR_TYPES = {
'ContinuosHeating':
['ContinuosHeating', '°C', 'mdi:weather-snowy', 0],
'PowerEnergyConsumptionLastMonth':
['PrEnergySumHcLastMonth', 'kWh', 'mdi:flash', 0],
['PrEnergySumHcLastMonth', ENERGY_KILO_WATT_HOUR, 'mdi:flash', 0],
'PowerEnergyConsumptionThisMonth':
['PrEnergySumHcThisMonth', 'kWh', 'mdi:flash', 0]
['PrEnergySumHcThisMonth', ENERGY_KILO_WATT_HOUR, 'mdi:flash', 0]
},
'ehp': {
'HWTemperature':
@@ -89,12 +91,12 @@ SENSOR_TYPES = {
'Flame':
['Flame', None, 'mdi:toggle-switch', 2],
'PowerEnergyConsumptionHeatingCircuit':
['PrEnergySumHc1', 'kWh', 'mdi:flash', 0],
['PrEnergySumHc1', ENERGY_KILO_WATT_HOUR, 'mdi:flash', 0],
'PowerEnergyConsumptionHotWaterCircuit':
['PrEnergySumHwc1', 'kWh', 'mdi:flash', 0],
['PrEnergySumHwc1', ENERGY_KILO_WATT_HOUR, 'mdi:flash', 0],
'RoomThermostat':
['DCRoomthermostat', None, 'mdi:toggle-switch', 2],
'HeatingPartLoad':
['PartloadHcKW', 'kWh', 'mdi:flash', 0]
['PartloadHcKW', ENERGY_KILO_WATT_HOUR, 'mdi:flash', 0]
}
}