Skip to content

Commit

Permalink
Update converters.
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Feb 25, 2020
1 parent 9cc84fe commit a36f11a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
1 change: 1 addition & 0 deletions lib/extension/homeassistant.js
Original file line number Diff line number Diff line change
Expand Up @@ -1237,6 +1237,7 @@ const mapping = {
'07048L': [cfg.switch, cfg.sensor_power],
'ICZB-KPD14S': [cfg.sensor_battery, cfg.sensor_click, cfg.sensor_action],
'73743': [cfg.sensor_action, cfg.sensor_battery],
'C4': [cfg.sensor_action],
};

Object.keys(mapping).forEach((key) => {
Expand Down
32 changes: 16 additions & 16 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"semver": "*",
"winston": "*",
"zigbee-herdsman": "0.12.55",
"zigbee-herdsman-converters": "12.0.30"
"zigbee-herdsman-converters": "12.0.31"
},
"devDependencies": {
"eslint": "*",
Expand Down
8 changes: 4 additions & 4 deletions test/entityPublish.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ describe('Entity publish', () => {
await MQTT.events.message('zigbee2mqtt/siren/set', JSON.stringify(payload));
await flushPromises();
expect(endpoint.command).toHaveBeenCalledTimes(1);
expect(endpoint.command).toHaveBeenCalledWith("ssIasWd", "startWarning", {"startwarninginfo": 22, "warningduration": 100}, {});
expect(endpoint.command).toHaveBeenCalledWith("ssIasWd", "startWarning", {"startwarninginfo": 22, "warningduration": 100}, {disableDefaultResponse: true});
});

it('HS2WD-E emergency warning', async () => {
Expand All @@ -921,7 +921,7 @@ describe('Entity publish', () => {
await MQTT.events.message('zigbee2mqtt/siren/set', JSON.stringify(payload));
await flushPromises();
expect(endpoint.command).toHaveBeenCalledTimes(1);
expect(endpoint.command).toHaveBeenCalledWith("ssIasWd", "startWarning", {"startwarninginfo": 51, "warningduration": 10}, {});
expect(endpoint.command).toHaveBeenCalledWith("ssIasWd", "startWarning", {"startwarninginfo": 51, "warningduration": 10}, {disableDefaultResponse: true});
});

it('HS2WD-E emergency without level', async () => {
Expand All @@ -930,7 +930,7 @@ describe('Entity publish', () => {
await MQTT.events.message('zigbee2mqtt/siren/set', JSON.stringify(payload));
await flushPromises();
expect(endpoint.command).toHaveBeenCalledTimes(1);
expect(endpoint.command).toHaveBeenCalledWith("ssIasWd", "startWarning", {"startwarninginfo": 49, "warningduration": 10}, {});
expect(endpoint.command).toHaveBeenCalledWith("ssIasWd", "startWarning", {"startwarninginfo": 49, "warningduration": 10}, {disableDefaultResponse: true});
});

it('HS2WD-E wrong payload (should use defaults)', async () => {
Expand All @@ -939,7 +939,7 @@ describe('Entity publish', () => {
await MQTT.events.message('zigbee2mqtt/siren/set', JSON.stringify(payload));
await flushPromises();
expect(endpoint.command).toHaveBeenCalledTimes(1);
expect(endpoint.command).toHaveBeenCalledWith("ssIasWd", "startWarning", {"startwarninginfo": 53, "warningduration": 10}, {});
expect(endpoint.command).toHaveBeenCalledWith("ssIasWd", "startWarning", {"startwarninginfo": 53, "warningduration": 10}, {disableDefaultResponse: true});
});

it('Shouldnt do anythign when device is not supported', async () => {
Expand Down

0 comments on commit a36f11a

Please sign in to comment.