# It's time to fix Aqara battery bug

**URL:** <https://forum.phoscon.de/t/its-time-to-fix-aqara-battery-bug/2368>\
**Category:** General Support\
**Created:** [August 24, 2022, 8:15pm UTC](https://forum.phoscon.de/t/its-time-to-fix-aqara-battery-bug/2368 "2022-08-24T20:15:03Z")\
**Posts on this page:** 1\
**Showing post:** 57

<div class="post-metadata">

**Author:** ![bcutter](https://forum.phoscon.de/user_avatar/forum.phoscon.de/bcutter/32/599_2.png) [@bcutter](https://forum.phoscon.de/u/bcutter)\
**Post date:** [February 4, 2024, 5:38pm UTC](https://forum.phoscon.de/t/its-time-to-fix-aqara-battery-bug/2368/57 "2024-02-04T17:38:12Z")

</div>

Well… as you can see here in the original DDF…

> <https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/devices/xiaomi/xiaomi_gzcgq01lm_light_sensor.json>

…there is not such a part in this DDF. What I can see which looks interesting is this part:

```auto
        {
          "name": "config/battery",
          "awake": true,
          "parse": {
            "at": "0x00f7",
            "ep": 1,
            "fn": "xiaomi:special",
            "idx": "0x01",
            "script": "xiaomi_battery.js"
          }

```

So this seems to be “outsourced” to the `xiaomi_battery.js` script:

> <https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/devices/xiaomi/xiaomi_battery.js>

As I don’t want to change the `xiaomi_battery.js` - as it is likely used by other devices where I don’t want/need/must implement this workaround, but only for the `gzcgq01lm` light sensors:

How to properly source that part back in to the `xiaomi_gzcgq01lm_light_sensor.json`? Help appreciated @Smanar.

---

_[View the full topic](https://forum.phoscon.de/t/its-time-to-fix-aqara-battery-bug/2368)._
