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
@@ -5,7 +5,7 @@ from typing import Optional, Sequence
|
||||
from homeassistant.const import (
|
||||
DEVICE_CLASS_BATTERY, DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_ILLUMINANCE,
|
||||
DEVICE_CLASS_TEMPERATURE, DEVICE_CLASS_TIMESTAMP, MASS_KILOGRAMS,
|
||||
POWER_WATT, TEMP_CELSIUS, TEMP_FAHRENHEIT)
|
||||
ENERGY_KILO_WATT_HOUR, POWER_WATT, TEMP_CELSIUS, TEMP_FAHRENHEIT)
|
||||
|
||||
from . import SmartThingsEntity
|
||||
from .const import DATA_BROKERS, DOMAIN
|
||||
@@ -54,7 +54,7 @@ CAPABILITY_TO_SENSORS = {
|
||||
Map('fineDustLevel', "Fine Dust Level", None, None),
|
||||
Map('dustLevel', "Dust Level", None, None)],
|
||||
'energyMeter': [
|
||||
Map('energy', "Energy Meter", 'kWh', None)],
|
||||
Map('energy', "Energy Meter", ENERGY_KILO_WATT_HOUR, None)],
|
||||
'equivalentCarbonDioxideMeasurement': [
|
||||
Map('equivalentCarbonDioxideMeasurement',
|
||||
'Equivalent Carbon Dioxide Measurement', 'ppm', None)],
|
||||
|
||||
Reference in new issue
Block a user