diff --git a/tasmota/xdrv_23_zigbee_5_converters.ino b/tasmota/xdrv_23_zigbee_5_converters.ino index 642901f13..7be21aab5 100644 --- a/tasmota/xdrv_23_zigbee_5_converters.ino +++ b/tasmota/xdrv_23_zigbee_5_converters.ino @@ -2004,4 +2004,19 @@ void Z_Data::toAttributes(Z_attribute_list & attr_list, Z_Data_Type type) const } } +// +// Check if this device needs Battery reporting +// This is usefule for IKEA device that tend to drain battery quickly when Battery reporting is set +// +bool Z_BatteryReportingDeviceSpecific(uint16_t shortaddr) { + const Z_Device & device = zigbee_devices.findShortAddr(shortaddr); + if (device.manufacturerId) { + String manuf_c(device.manufacturerId); + if (manuf_c.startsWith(F("IKEA"))) { + return false; + } + } + return true; +} + #endif // USE_ZIGBEE diff --git a/tasmota/xdrv_23_zigbee_8_parsers.ino b/tasmota/xdrv_23_zigbee_8_parsers.ino index 8dca8c6a7..ba99e5e79 100644 --- a/tasmota/xdrv_23_zigbee_8_parsers.ino +++ b/tasmota/xdrv_23_zigbee_8_parsers.ino @@ -614,6 +614,7 @@ void Z_AutoBindDefer(uint16_t shortaddr, uint8_t endpoint, const SBuffer &buf, for (uint32_t i=0; i