Update converters.

This commit is contained in:
Koen Kanters
2020-06-06 14:45:43 +02:00
parent d66e1c322b
commit f8ea6cb574
4 changed files with 20 additions and 4 deletions
+1
View File
@@ -1688,6 +1688,7 @@ const mapping = {
'TI0001-switch': [cfg.switch],
'TI0001-socket': [cfg.switch],
'9290022891': [cfg.light_brightness_colortemp_colorxy],
'ZS232000178': [cfg.sensor_action],
};
/**
+3 -3
View File
@@ -14195,9 +14195,9 @@
}
},
"zigbee-herdsman-converters": {
"version": "12.0.105",
"resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-12.0.105.tgz",
"integrity": "sha512-IOu0vHiZj66PzyfEEWx9v7zsOIj9TeN0UDtmUKYd3uduIu8Gv6QKe/iwG7mH+ZYBkjqnSoLCJZ1kv4BekVU5Vg==",
"version": "12.0.108",
"resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-12.0.108.tgz",
"integrity": "sha512-4rPRHO6kXyaHz77CThu7OxPZkgoMooc3a+q3a2bEE1sAEK6RgY+FkRCoAjNqlUwTR36o66yFTSc2gU9sFoAlPw==",
"requires": {
"axios": "*",
"https-proxy-agent": "*",
+1 -1
View File
@@ -47,7 +47,7 @@
"winston": "*",
"winston-syslog": "*",
"zigbee-herdsman": "0.12.91",
"zigbee-herdsman-converters": "12.0.105"
"zigbee-herdsman-converters": "12.0.108"
},
"devDependencies": {
"eslint": "*",
+15
View File
@@ -524,6 +524,21 @@ describe('Publish', () => {
expectNothingPublished();
});
it('Should send state update on toggle specific endpoint', async () => {
const device = zigbeeHerdsman.devices.QBKG03LM;
const endpoint = device.getEndpoint(2);
await MQTT.events.message('zigbee2mqtt/wall_switch_double/left/set', 'ON');
await flushPromises();
await MQTT.events.message('zigbee2mqtt/wall_switch_double/left/set', 'TOGGLE');
await flushPromises();
expect(endpoint.command).toHaveBeenCalledTimes(2);
expect(endpoint.command).toHaveBeenCalledWith("genOnOff", "on", {}, {});
expect(endpoint.command).toHaveBeenCalledWith("genOnOff", "toggle", {}, {});
expect(MQTT.publish).toHaveBeenCalledTimes(2);
expect(MQTT.publish.mock.calls[0]).toEqual(["zigbee2mqtt/wall_switch_double", JSON.stringify({state_left: 'ON'}), {"qos": 0, "retain": false}, expect.any(Function)]);
expect(MQTT.publish.mock.calls[1]).toEqual(["zigbee2mqtt/wall_switch_double", JSON.stringify({state_left: 'OFF'}), {"qos": 0, "retain": false}, expect.any(Function)]);
});
it('Should parse set with postfix topic and attribute', async () => {
const device = zigbeeHerdsman.devices.QBKG03LM;
const endpoint = device.getEndpoint(2);