mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 08:47:10 +00:00
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:
parent
226be65910
commit
ac5ccd651c
@ -32,7 +32,7 @@ REQUIREMENTS = [
|
||||
'bellows-homeassistant==0.7.1',
|
||||
'zigpy-homeassistant==0.3.0',
|
||||
'zigpy-xbee-homeassistant==0.1.2',
|
||||
'zha-quirks==0.0.6',
|
||||
'zha-quirks==0.0.7',
|
||||
'zigpy-deconz==0.1.2'
|
||||
]
|
||||
|
||||
|
@ -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
|
||||
|
@ -1826,7 +1826,7 @@ zengge==0.2
|
||||
zeroconf==0.21.3
|
||||
|
||||
# homeassistant.components.zha
|
||||
zha-quirks==0.0.6
|
||||
zha-quirks==0.0.7
|
||||
|
||||
# homeassistant.components.climate.zhong_hong
|
||||
zhong_hong_hvac==1.0.9
|
||||
|
Loading…
x
Reference in New Issue
Block a user