diff --git a/custom_components/localtuya/core/ha_entities/sensors.py b/custom_components/localtuya/core/ha_entities/sensors.py index 70de8e71..a8b6e950 100644 --- a/custom_components/localtuya/core/ha_entities/sensors.py +++ b/custom_components/localtuya/core/ha_entities/sensors.py @@ -21,6 +21,7 @@ UnitOfVolume, UnitOfElectricPotential, DEGREE, + LIGHT_LUX, ) from .base import ( @@ -651,6 +652,7 @@ def localtuya_sensor(unit_of_measurement=None, scale_factor: float = 1) -> dict: entity_category=EntityCategory.DIAGNOSTIC, device_class=SensorDeviceClass.ILLUMINANCE, state_class=SensorStateClass.MEASUREMENT, + custom_configs=localtuya_sensor(LIGHT_LUX), ), *BATTERY_SENSORS, ), @@ -903,6 +905,7 @@ def localtuya_sensor(unit_of_measurement=None, scale_factor: float = 1) -> dict: name="Illuminance", device_class=SensorDeviceClass.ILLUMINANCE, state_class=SensorStateClass.MEASUREMENT, + custom_configs=localtuya_sensor(LIGHT_LUX), ), *BATTERY_SENSORS, ),