Allow to specify options device/configure_reporting. https://github.com/Koenkk/zigbee2mqtt/issues/11442

This commit is contained in:
Koen Kanters
2022-02-16 21:32:59 +01:00
parent 84043702c1
commit 7ec6a2b483
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -419,7 +419,7 @@ export default class Bridge extends Extension {
await endpoint.configureReporting(message.cluster, [{
attribute: message.attribute, minimumReportInterval: message.minimum_report_interval,
maximumReportInterval: message.maximum_report_interval, reportableChange: message.reportable_change,
}]);
}], message.options);
this.publishDevices();
+1 -1
View File
@@ -965,7 +965,7 @@ describe('Bridge', () => {
expect(endpoint.bind).toHaveBeenCalledTimes(1);
expect(endpoint.bind).toHaveBeenCalledWith('genLevelCtrl', coordinator.endpoints[0]);
expect(endpoint.configureReporting).toHaveBeenCalledTimes(1);
expect(endpoint.configureReporting).toHaveBeenCalledWith('genLevelCtrl', [{"attribute": "currentLevel", "maximumReportInterval": 10, "minimumReportInterval": 1, "reportableChange": 1}]);
expect(endpoint.configureReporting).toHaveBeenCalledWith('genLevelCtrl', [{"attribute": "currentLevel", "maximumReportInterval": 10, "minimumReportInterval": 1, "reportableChange": 1}], undefined);
expect(MQTT.publish).toHaveBeenCalledWith(
'zigbee2mqtt/bridge/response/device/configure_reporting',
stringify({"data":{id: '0x000b57fffec6a5b2/1', cluster: 'genLevelCtrl', attribute: 'currentLevel', maximum_report_interval: 10, minimum_report_interval: 1, reportable_change: 1},"status":"ok"}),