Add and use light lux constant in entire code base (#40171)

This commit is contained in:
springstan 2020-09-23 20:48:01 +02:00 committed by GitHub
parent 6a7caad8dc
commit 6c8e0e20fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 71 additions and 46 deletions

View file

@ -13,6 +13,7 @@ from homeassistant.const import (
DEVICE_CLASS_TEMPERATURE,
DEVICE_CLASS_TIMESTAMP,
ENERGY_KILO_WATT_HOUR,
LIGHT_LUX,
MASS_KILOGRAMS,
PERCENTAGE,
POWER_WATT,
@ -116,7 +117,7 @@ CAPABILITY_TO_SENSORS = {
)
],
Capability.illuminance_measurement: [
Map(Attribute.illuminance, "Illuminance", "lux", DEVICE_CLASS_ILLUMINANCE)
Map(Attribute.illuminance, "Illuminance", LIGHT_LUX, DEVICE_CLASS_ILLUMINANCE)
],
Capability.infrared_level: [
Map(Attribute.infrared_level, "Infrared Level", PERCENTAGE, None)