mirror of https://github.com/arendst/Tasmota.git
Merge pull request #10474 from s-hadinger/zigbee_philips_no_battery_reporting
Zigbee don't report battery value for Philips devices
This commit is contained in:
commit
a8296f4754
|
@ -2159,13 +2159,13 @@ void Z_Data::toAttributes(Z_attribute_list & attr_list) const {
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check if this device needs Battery reporting
|
// Check if this device needs Battery reporting
|
||||||
// This is usefule for IKEA device that tend to drain battery quickly when Battery reporting is set
|
// This is useful for IKEA or Philips devices that tend to drain battery quickly when Battery reporting is set
|
||||||
//
|
//
|
||||||
bool Z_BatteryReportingDeviceSpecific(uint16_t shortaddr) {
|
bool Z_BatteryReportingDeviceSpecific(uint16_t shortaddr) {
|
||||||
const Z_Device & device = zigbee_devices.findShortAddr(shortaddr);
|
const Z_Device & device = zigbee_devices.findShortAddr(shortaddr);
|
||||||
if (device.manufacturerId) {
|
if (device.manufacturerId) {
|
||||||
String manuf_c(device.manufacturerId);
|
String manuf_c(device.manufacturerId);
|
||||||
if (manuf_c.startsWith(F("IKEA"))) {
|
if ((manuf_c.startsWith(F("IKEA"))) || (manuf_c.startsWith(F("Philips")))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue