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

This commit is contained in:
springstan authored and GitHub committed 2020-09-23 20:48:01 +02:00
1 parent 6a7caad8dc
commit 6c8e0e20fb
30 files changed
+71 -46

No files matched your search

+2 -1
View File
@@ -14,6 +14,7 @@ from homeassistant.const import (
CONF_UNIT_SYSTEM,
CONF_UNIT_SYSTEM_IMPERIAL,
CONF_UNIT_SYSTEM_METRIC,
LIGHT_LUX,
PERCENTAGE,
POWER_WATT,
PRESSURE_HPA,
@@ -58,7 +59,7 @@ async def async_test_pressure(hass, cluster, entity_id):
async def async_test_illuminance(hass, cluster, entity_id):
"""Test illuminance sensor."""
await send_attributes_report(hass, cluster, {1: 1, 0: 10, 2: 20})
assert_state(hass, entity_id, "1.0", "lx")
assert_state(hass, entity_id, "1.0", LIGHT_LUX)
async def async_test_metering(hass, cluster, entity_id):