Fix zha illuminance measured value mapping (#108547)

This commit is contained in:
Florian Kisser 2024-01-21 02:37:13 +01:00 committed by GitHub
parent 3c6e7b188e
commit b5bb97c856
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

View file

@ -136,6 +136,12 @@ async def async_test_illuminance(hass, cluster, entity_id):
await send_attributes_report(hass, cluster, {1: 1, 0: 10, 2: 20})
assert_state(hass, entity_id, "1", LIGHT_LUX)
await send_attributes_report(hass, cluster, {1: 0, 0: 0, 2: 20})
assert_state(hass, entity_id, "0", LIGHT_LUX)
await send_attributes_report(hass, cluster, {1: 0, 0: 0xFFFF, 2: 20})
assert_state(hass, entity_id, "unknown", LIGHT_LUX)
async def async_test_metering(hass, cluster, entity_id):
"""Test Smart Energy metering sensor."""