Support formatting and scaling with ZHA Metering cluster (#26201)

* Support formatting and scaling with Metering cluster

* fix lint

* run black formatter
This commit is contained in:
presslab-us 2019-08-26 23:16:54 -04:00 committed by Alexei Chetroi
parent 03cfe7247b
commit 8e5d272b5f
3 changed files with 99 additions and 10 deletions

View file

@ -160,8 +160,8 @@ async def async_test_illuminance(hass, device_info):
async def async_test_metering(hass, device_info):
"""Test metering sensor."""
await send_attribute_report(hass, device_info["cluster"], 1024, 10)
assert_state(hass, device_info, "10", "W")
await send_attribute_report(hass, device_info["cluster"], 1024, 12345)
assert_state(hass, device_info, "12345.0", "unknown")
async def async_test_electrical_measurement(hass, device_info):