From 49530c53893da290c26c4236d714a67df58612ff Mon Sep 17 00:00:00 2001 From: Rickth64 <2139952+Rickth64@users.noreply.github.com> Date: Mon, 17 Jun 2024 21:40:04 +0200 Subject: [PATCH] feat: extend battery level reading to gcls002 feat: extend battery level reading to gcls002 --- src/xiaomi_ble/parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xiaomi_ble/parser.py b/src/xiaomi_ble/parser.py index 1416ef4..b764d23 100644 --- a/src/xiaomi_ble/parser.py +++ b/src/xiaomi_ble/parser.py @@ -2000,7 +2000,7 @@ def poll_needed( # kind of device we are return False - if self.device_id != 0x0098: + if self.device_id not in [0x03BC, 0x0098]: return False return not last_poll or last_poll > TIMEOUT_1DAY @@ -2009,7 +2009,7 @@ async def async_poll(self, ble_device: BLEDevice) -> SensorUpdate: """ Poll the device to retrieve any values we can't get from passive listening. """ - if self.device_id == 0x0098: + if self.device_id in [0x03BC, 0x0098]: client = await establish_connection( BleakClient, ble_device, ble_device.address )