Update zigbee-herdsman-converters to 12.0.172 (#4180)

* Update zigbee-herdsman-converters to 12.0.172

* Update homeassistant.js

* Update zigbeeHerdsman.js

* Update publish.test.js

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
This commit is contained in:
github-actions[bot]
2020-08-25 20:01:46 +02:00
committed by GitHub
co-authored by github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Koen Kanters
parent 57b3511aa6
commit db6d9bd5bb
5 changed files with 23 additions and 12 deletions
+3 -1
View File
@@ -1754,7 +1754,7 @@ const mapping = {
'MOSZB-130': [cfg.binary_sensor_occupancy, cfg.binary_sensor_battery_low],
'AU-A1ZBRC': [cfg.sensor_action, cfg.sensor_battery],
'AU-A1ZBPIRS': [cfg.binary_sensor_occupancy, cfg.binary_sensor_battery_low, cfg.sensor_illuminance_lux],
'TS0121': [cfg.switch, cfg.sensor_voltage, cfg.sensor_power, cfg.sensor_current],
'TS0121_plug': [cfg.switch, cfg.sensor_voltage, cfg.sensor_power, cfg.sensor_current],
'ZK03840': [climate()],
'ZS1100400-IN-V1A02': [cfg.binary_sensor_occupancy, cfg.binary_sensor_battery_low],
'MCLH-08': [cfg.sensor_temperature, cfg.sensor_humidity, cfg.sensor_eco2, cfg.sensor_voc],
@@ -1909,6 +1909,8 @@ const mapping = {
'TPZRCO2HT-Z3': [cfg.sensor_temperature, cfg.sensor_humidity, cfg.sensor_battery, cfg.sensor_co2],
'43100': [cfg.switch],
'3400-D': [cfg.sensor_action, cfg.sensor_battery],
'GL-FL-006TZS': [cfg.light_brightness_colortemp_colorxy],
'TS0121_switch': [cfg.switch],
};
const defaultStatusTopic = 'homeassistant/status';
+3 -3
View File
@@ -15023,9 +15023,9 @@
}
},
"zigbee-herdsman-converters": {
"version": "12.0.170",
"resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-12.0.170.tgz",
"integrity": "sha512-sC3GXb2cauXRMR8jFGYDXvFl7yqCt1ufajH+cbKKkZQYSb2RG2w342cNZ9FBIJ1ADQcPxzOU7k4qlPsNtigMpw==",
"version": "12.0.172",
"resolved": "https://registry.npmjs.org/zigbee-herdsman-converters/-/zigbee-herdsman-converters-12.0.172.tgz",
"integrity": "sha512-8qwLeCryBFKRS7t4YHQ9bYUjeXnJhdpRUj2CaEW07CSIPWbyuOq29BsupbcgAX6EE56D4NbcKznhm7sT2Ittig==",
"requires": {
"axios": "^0.20.0",
"https-proxy-agent": "^5.0.0",
+1 -1
View File
@@ -49,7 +49,7 @@
"winston": "^3.3.3",
"winston-syslog": "^2.4.4",
"zigbee-herdsman": "0.12.121",
"zigbee-herdsman-converters": "12.0.170"
"zigbee-herdsman-converters": "12.0.172"
},
"devDependencies": {
"eslint": "*",
+15 -6
View File
@@ -779,14 +779,23 @@ describe('Publish', () => {
expect(MQTT.publish.mock.calls[2]).toEqual(["zigbee2mqtt/bulb_color", stringify({state: 'ON', brightness: 50}), {"qos": 0, "retain": false}, expect.any(Function)]);
});
it('Should turn device off when brightness 0 is send with light_brightness converter', async () => {
const device = zigbeeHerdsman.devices.HGZB04D;
it('Should turn device off when brightness 0 is send with transition', async () => {
const device = zigbeeHerdsman.devices.bulb_color;
const endpoint = device.getEndpoint(1);
const payload = {'brightness': 0};
await MQTT.events.message('zigbee2mqtt/dimmer_wall_switch/set', stringify(payload));
await MQTT.events.message('zigbee2mqtt/bulb_color/set', stringify({brightness: 50, state: 'ON'}));
await flushPromises();
expect(endpoint.command).toHaveBeenCalledTimes(1);
expect(endpoint.command.mock.calls[0]).toEqual(["genOnOff", "off", {}, {}]);
await MQTT.events.message('zigbee2mqtt/bulb_color/set', stringify({brightness: 0, transition: 3}));
await flushPromises();
await MQTT.events.message('zigbee2mqtt/bulb_color/set', stringify({state: 'ON'}));
await flushPromises();
expect(endpoint.command).toHaveBeenCalledTimes(3);
expect(endpoint.command.mock.calls[0]).toEqual(["genLevelCtrl", "moveToLevelWithOnOff", {level: 50, transtime: 0}, {}]);
expect(endpoint.command.mock.calls[1]).toEqual(["genLevelCtrl", "moveToLevelWithOnOff", {level: 0, transtime: 30}, {}]);
expect(endpoint.command.mock.calls[2]).toEqual(["genLevelCtrl", "moveToLevelWithOnOff", {level: 50, transtime: 0}, {}]);
expect(MQTT.publish).toHaveBeenCalledTimes(3);
expect(MQTT.publish.mock.calls[0]).toEqual(["zigbee2mqtt/bulb_color", stringify({state: 'ON', brightness: 50}), {"qos": 0, "retain": false}, expect.any(Function)]);
expect(MQTT.publish.mock.calls[1]).toEqual(["zigbee2mqtt/bulb_color", stringify({state: 'OFF', brightness: 0}), {"qos": 0, "retain": false}, expect.any(Function)]);
expect(MQTT.publish.mock.calls[2]).toEqual(["zigbee2mqtt/bulb_color", stringify({state: 'ON', brightness: 50}), {"qos": 0, "retain": false}, expect.any(Function)]);
});
it('Should allow to set color via hue and saturation', async () => {
+1 -1
View File
@@ -128,7 +128,7 @@ const devices = {
'QBKG03LM':new Device('Router', '0x0017880104e45542', 6540,4151, [new Endpoint(1, [0], [], '0x0017880104e45542'), new Endpoint(2, [0, 6], [], '0x0017880104e45542'), new Endpoint(3, [0, 6], [], '0x0017880104e45542')], true, "Mains (single phase)", 'lumi.ctrl_neutral2'),
'GLEDOPTO1112': new Device('Router', '0x0017880104e45543', 6540, 4151, [new Endpoint(11, [0], [], '0x0017880104e45543'), new Endpoint(13, [0], [], '0x0017880104e45543')], true, "Mains (single phase)", 'GL-C-008'),
'GLEDOPTO111213': new Device('Router', '0x0017880104e45544', 6540,4151, [new Endpoint(11, [0], []), new Endpoint(13, [0], []), new Endpoint(12, [0], [])], true, "Mains (single phase)", 'GL-C-008'),
'HGZB04D': new Device('Router', '0x0017880104e45545', 6540,4151, [new Endpoint(1, [0], [])], true, "Mains (single phase)", 'FB56+ZSC05HG1.0'),
'HGZB04D': new Device('Router', '0x0017880104e45545', 6540,4151, [new Endpoint(1, [0], [], '0x0017880104e45545')], true, "Mains (single phase)", 'FB56+ZSC05HG1.0'),
'ZNCLDJ11LM': new Device('Router', '0x0017880104e45547', 6540,4151, [new Endpoint(1, [0], []), new Endpoint(2, [0], [])], true, "Mains (single phase)", 'lumi.curtain'),
'HAMPTON99432': new Device('Router', '0x0017880104e45548', 6540,4151, [new Endpoint(1, [0], []), new Endpoint(2, [0], [])], true, "Mains (single phase)", 'HDC52EastwindFan'),
'HS2WD': new Device('Router', '0x0017880104e45549', 6540,4151, [new Endpoint(1, [0], [])], true, "Mains (single phase)", 'WarningDevice'),