Add and use light lux constant in entire code base (#40171)
This commit is contained in:
parent
6a7caad8dc
commit
6c8e0e20fb
30 changed files with 71 additions and 46 deletions
|
@ -7,6 +7,7 @@ from homeassistant.const import (
|
|||
DEVICE_CLASS_HUMIDITY,
|
||||
DEVICE_CLASS_ILLUMINANCE,
|
||||
DEVICE_CLASS_TEMPERATURE,
|
||||
LIGHT_LUX,
|
||||
PERCENTAGE,
|
||||
TEMP_CELSIUS,
|
||||
)
|
||||
|
@ -19,8 +20,6 @@ TEMP_C_ICON = "mdi:thermometer"
|
|||
BRIGHTNESS_ICON = "mdi:brightness-6"
|
||||
CO2_ICON = "mdi:molecule-co2"
|
||||
|
||||
UNIT_LUX = "lux"
|
||||
|
||||
|
||||
class HomeKitHumiditySensor(HomeKitEntity):
|
||||
"""Representation of a Homekit humidity sensor."""
|
||||
|
@ -113,7 +112,7 @@ class HomeKitLightSensor(HomeKitEntity):
|
|||
@property
|
||||
def unit_of_measurement(self):
|
||||
"""Return units for the sensor."""
|
||||
return UNIT_LUX
|
||||
return LIGHT_LUX
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue