Bump quirks for ZHA and handle resulting battery % change (#21869)

* bump quirks and handle battery change

* move inside guard

* round battery
This commit is contained in:
David F. Mulcahey authored and Paulus Schoutsen committed 2019-03-09 12:14:58 -08:00
1 parent 226be65910
commit ac5ccd651c
3 files changed
+5 -2

No files matched your search

@@ -147,4 +147,7 @@ class ZhaDeviceEntity(ZhaEntity):
battery = await self._battery_channel.get_attribute_value(
'battery_percentage_remaining')
if battery is not None:
# per zcl specs battery percent is reported at 200% ¯\_(ツ)_/¯
battery = battery / 2
battery = int(round(battery))
self._device_state_attributes['battery_level'] = battery