Update herdsman and converters.

This commit is contained in:
Koen Kanters
2019-11-12 19:40:52 +01:00
parent e51ed89641
commit e33b49e2ff
5 changed files with 24 additions and 8 deletions
+12
View File
@@ -852,4 +852,16 @@ describe('Entity publish', () => {
await flushPromises();
expectNothingPublished();
});
it('Should publish state to roller shutter', async () => {
const endpoint = zigbeeHerdsman.devices.roller_shutter.getEndpoint(1);
await MQTT.events.message('zigbee2mqtt/roller_shutter/set', JSON.stringify({state: 'OPEN'}));
await flushPromises();
expect(endpoint.command).toHaveBeenCalledTimes(1);
expect(endpoint.command).toHaveBeenCalledWith("genLevelCtrl", "currentLevel", {"level": "255", "transtime": 0}, {});
expect(MQTT.publish).toHaveBeenCalledTimes(1);
expect(MQTT.publish.mock.calls[0][0]).toStrictEqual('zigbee2mqtt/roller_shutter');
expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({position: 100});
expect(MQTT.publish.mock.calls[0][2]).toStrictEqual({"qos": 0, "retain": false});
});
});
+3
View File
@@ -129,6 +129,9 @@ function writeDefaultConfiguration() {
'0x90fd9ffffe4b64ae': {
retain: false,
friendly_name: 'tradfri_remote',
},
'0x90fd9ffffe4b64af': {
friendly_name: 'roller_shutter',
}
},
groups: {
+1
View File
@@ -128,6 +128,7 @@ const devices = {
'CC2530_ROUTER': new Device('Router', '0x0017880104e45559', 6540,4151, [new Endpoint(1, [0, 6], [])], true, "Mains (single phase)", 'lumi.router'),
'LIVOLO': new Device('Router', '0x0017880104e45560', 6541,4152, [new Endpoint(6, [0, 6], [])], true, "Mains (single phase)", 'TI0001 '),
'tradfri_remote': new Device('EndDevice', '0x90fd9ffffe4b64ae', 33906, 4476, [new Endpoint(1, [0], [0,3,4,6,8,5], '0x90fd9ffffe4b64ae')], true, "Battery", "TRADFRI remote control"),
'roller_shutter': new Device('EndDevice', '0x90fd9ffffe4b64af', 33906, 4476, [new Endpoint(1, [0], [0,3,4,6,8,5], '0x90fd9ffffe4b64af')], true, "Battery", "SCM-R_00.00.03.15TC"),
}
const groups = {