Update zigbee-herdsman-converters to 19.14.0 (#22065)

* fix(ignore): update zigbee-herdsman-converters to 19.14.0

* fix tests

---------

Co-authored-by: Koenkk <2892853+Koenkk@users.noreply.github.com>
This commit is contained in:
Koen Kanters
2024-04-04 19:33:39 +00:00
committed by GitHub
co-authored by Koenkk
parent 919c4eee73
commit 701cdda38c
5 changed files with 16 additions and 16 deletions
+4 -4
View File
@@ -34,7 +34,7 @@
"winston-transport": "^4.7.0",
"ws": "^8.16.0",
"zigbee-herdsman": "0.41.1",
"zigbee-herdsman-converters": "19.13.0",
"zigbee-herdsman-converters": "19.14.0",
"zigbee2mqtt-frontend": "0.6.161"
},
"bin": {
@@ -9802,9 +9802,9 @@
}
},
"node_modules/zigbee-herdsman-converters": {
"version": "19.13.0",
"resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-19.13.0.tgz",
"integrity": "sha512-UeeanNDLwTPBMC4U7doARcRA7vIMpBhNqEPHqIjpRItJh+bSyy2br17+yA4Eq3ZrvGr13gzXBI5ImdNYWJju2g==",
"version": "19.14.0",
"resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-19.14.0.tgz",
"integrity": "sha512-xoDZdKF0n30FnIs7fyKuDFst7xjlcWGQlGnOwIpcUCCrhyYHlQ1sJpjGiocRtm1n7ue1l5N7RXhYZBj03AfKgw==",
"dependencies": {
"axios": "^1.6.8",
"buffer-crc32": "^1.0.0",
+1 -1
View File
@@ -60,7 +60,7 @@
"winston-transport": "^4.7.0",
"ws": "^8.16.0",
"zigbee-herdsman": "0.41.1",
"zigbee-herdsman-converters": "19.13.0",
"zigbee-herdsman-converters": "19.14.0",
"zigbee2mqtt-frontend": "0.6.161"
},
"devDependencies": {
+1 -1
View File
@@ -157,7 +157,7 @@ describe('Bind', () => {
expect(target.configureReporting).toHaveBeenCalledWith("genOnOff",[{"attribute": "onOff", "maximumReportInterval": 0xFFFF, "minimumReportInterval": 0, "reportableChange": 0}]);
expect(target.configureReporting).toHaveBeenCalledWith("genLevelCtrl",[{"attribute": "currentLevel", "maximumReportInterval": 0xFFFF, "minimumReportInterval": 5, "reportableChange": 1}]);
expect(target.configureReporting).toHaveBeenCalledWith("lightingColorCtrl",[{"attribute":"colorTemperature","minimumReportInterval":5,"maximumReportInterval":0xFFFF,"reportableChange":1},{"attribute":"currentX","minimumReportInterval":5,"maximumReportInterval":0xFFFF,"reportableChange":1},{"attribute":"currentY","minimumReportInterval":5,"maximumReportInterval":0xFFFF,"reportableChange":1}]);
expect(zigbeeHerdsman.devices.bulb_color.meta.configured).toBe(1324213189);
expect(zigbeeHerdsman.devices.bulb_color.meta.configured).toBe(1889700129);
expect(MQTT.publish).toHaveBeenCalledWith(
'zigbee2mqtt/bridge/response/device/unbind',
stringify({"data":{"from":"remote","to":"bulb_color","clusters":["genScenes","genOnOff","genLevelCtrl"],"failed":[]},"status":"ok"}),
+1 -1
View File
@@ -24,7 +24,7 @@ describe('Configure', () => {
const endpoint2 = device.getEndpoint(2);
expect(endpoint2.write).toHaveBeenCalledTimes(1);
expect(endpoint2.write).toHaveBeenCalledWith("genBasic", {"49": {"type": 25, "value": 11}}, {"disableDefaultResponse": true, "manufacturerCode": 4107});
expect(device.meta.configured).toBe(1324213189);
expect(device.meta.configured).toBe(1889700129);
}
const expectBulbConfigured = () => {
+9 -9
View File
@@ -72,7 +72,7 @@ describe('OTA update', () => {
mockClear(mapped);
logger.info.mockClear();
device.save.mockClear();
mapped.ota.updateToLatest.mockImplementationOnce((a, b, onUpdate) => {
mapped.ota.updateToLatest.mockImplementationOnce((a, onUpdate) => {
onUpdate(0, null);
onUpdate(10, 3600.2123);
return 90;
@@ -83,7 +83,7 @@ describe('OTA update', () => {
expect(logger.info).toHaveBeenCalledWith(`Updating 'bulb' to latest firmware`);
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledTimes(0);
expect(mapped.ota.updateToLatest).toHaveBeenCalledTimes(1);
expect(mapped.ota.updateToLatest).toHaveBeenCalledWith(device, logger, expect.any(Function));
expect(mapped.ota.updateToLatest).toHaveBeenCalledWith(device, expect.any(Function));
expect(logger.info).toHaveBeenCalledWith(`Update of 'bulb' at 0.00%`);
expect(logger.info).toHaveBeenCalledWith(`Update of 'bulb' at 10.00%, ≈ 60 minutes remaining`);
expect(logger.info).toHaveBeenCalledWith(`Finished update of 'bulb'`);
@@ -126,7 +126,7 @@ describe('OTA update', () => {
const mapped = await zigbeeHerdsmanConverters.findByDevice(device)
mockClear(mapped);
device.save.mockClear();
mapped.ota.updateToLatest.mockImplementationOnce((a, b, onUpdate) => {
mapped.ota.updateToLatest.mockImplementationOnce((a, onUpdate) => {
throw new Error('Update failed');
});
@@ -260,7 +260,7 @@ describe('OTA update', () => {
await zigbeeHerdsman.events.message(payload);
await flushPromises();
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledTimes(1);
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledWith(device, logger, {"imageType": 12382});
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledWith(device, {"imageType": 12382});
expect(logger.info).toHaveBeenCalledWith(`Update available for 'bulb'`);
expect(device.endpoints[0].commandResponse).toHaveBeenCalledTimes(1);
expect(device.endpoints[0].commandResponse).toHaveBeenCalledWith("genOta", "queryNextImageResponse", {"status": 0x98}, undefined, 10);
@@ -294,7 +294,7 @@ describe('OTA update', () => {
await zigbeeHerdsman.events.message(payload);
await flushPromises();
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledTimes(1);
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledWith(device, logger, {"imageType": 12382});
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledWith(device, {"imageType": 12382});
expect(device.endpoints[0].commandResponse).toHaveBeenCalledTimes(1);
expect(device.endpoints[0].commandResponse).toHaveBeenCalledWith("genOta", "queryNextImageResponse", {"status": 0x98}, undefined, 10);
expect(MQTT.publish).toHaveBeenCalledWith(
@@ -316,7 +316,7 @@ describe('OTA update', () => {
await zigbeeHerdsman.events.message(payload);
await flushPromises();
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledTimes(1);
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledWith(device, logger, {"imageType": 12382});
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledWith(device, {"imageType": 12382});
expect(device.endpoints[0].commandResponse).toHaveBeenCalledTimes(1);
expect(device.endpoints[0].commandResponse).toHaveBeenCalledWith("genOta", "queryNextImageResponse", {"status": 0x98}, undefined, 10);
expect(MQTT.publish).toHaveBeenCalledWith(
@@ -374,7 +374,7 @@ describe('OTA update', () => {
logger.info.mockClear();
logger.error.mockClear();
device.save.mockClear();
mapped.ota.updateToLatest.mockImplementationOnce((a, b, onUpdate) => {
mapped.ota.updateToLatest.mockImplementationOnce((a, onUpdate) => {
onUpdate(0, null);
onUpdate(10, 3600);
return 91;
@@ -385,7 +385,7 @@ describe('OTA update', () => {
expect(logger.info).toHaveBeenCalledWith(`Updating 'bulb' to latest firmware`);
expect(mapped.ota.isUpdateAvailable).toHaveBeenCalledTimes(0);
expect(mapped.ota.updateToLatest).toHaveBeenCalledTimes(1);
expect(mapped.ota.updateToLatest).toHaveBeenCalledWith(device, logger, expect.any(Function));
expect(mapped.ota.updateToLatest).toHaveBeenCalledWith(device, expect.any(Function));
expect(logger.info).toHaveBeenCalledWith(`Update of 'bulb' at 0.00%`);
expect(logger.info).toHaveBeenCalledWith(`Update of 'bulb' at 10.00%, ≈ 60 minutes remaining`);
expect(logger.info).toHaveBeenCalledWith(`Finished update of 'bulb'`);
@@ -404,7 +404,7 @@ describe('OTA update', () => {
logger.info.mockClear();
logger.error.mockClear();
device.save.mockClear();
mapped.ota.updateToLatest.mockImplementationOnce((a, b, onUpdate) => {
mapped.ota.updateToLatest.mockImplementationOnce((a, onUpdate) => {
throw new Error('Update failed');
});