From 6ec6bf2790af95bf7bbd88d644d3d02739e44443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A5le=20Stor=C3=B8=20Hauknes?= Date: Thu, 2 Jan 2025 23:15:20 +0100 Subject: [PATCH] Fix Wave Enhance battery sensor --- airthings_ble/parser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/airthings_ble/parser.py b/airthings_ble/parser.py index 15bb8f5..7e30c6f 100644 --- a/airthings_ble/parser.py +++ b/airthings_ble/parser.py @@ -785,7 +785,9 @@ async def _wave_enhance_sensor_data( new_values: dict[str, float | str | None] = {} if (bat_data := command_sensor_data.get("BAT")) is not None: - new_values["battery"] = device.model.battery_percentage(float(bat_data)) + new_values["battery"] = device.model.battery_percentage( + float(bat_data) / 1000.0 + ) if (lux := command_sensor_data.get("LUX")) is not None: new_values["lux"] = lux