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:
s-hadinger 2021-01-09 15:11:12 +01:00 committed by GitHub
commit a8296f4754
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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;
} }
} }