mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-07-20 02:21:20 +00:00
Update zigbee-herdsman-converters.
This commit is contained in:
@@ -249,12 +249,11 @@ const cfg = {
|
||||
},
|
||||
|
||||
// Light
|
||||
'light_brightness_colortemp_colorxy_white': {
|
||||
'light_brightness_colorxy_white': {
|
||||
type: 'light',
|
||||
object_id: 'light',
|
||||
discovery_payload: {
|
||||
brightness: true,
|
||||
color_temp: true,
|
||||
xy: true,
|
||||
white_value: true,
|
||||
schema: 'json',
|
||||
@@ -504,7 +503,8 @@ const mapping = {
|
||||
'73693': [cfg.light_brightness_colortemp_colorxy],
|
||||
'324131092621': [cfg.sensor_action, cfg.sensor_battery],
|
||||
'9290012607': [cfg.binary_sensor_occupancy, cfg.sensor_temperature, cfg.sensor_illuminance, cfg.sensor_battery],
|
||||
'GL-C-008': [cfg.light_brightness_colortemp_colorxy_white],
|
||||
'GL-C-008': [cfg.light_brightness_colortemp_colorxy],
|
||||
'GL-C-009': [cfg.light_brightness],
|
||||
'STSS-MULT-001': [cfg.binary_sensor_contact, cfg.sensor_battery],
|
||||
'E11-G23/E11-G33': [cfg.light_brightness],
|
||||
'E1ACA4ABE38A': [cfg.light_brightness],
|
||||
@@ -587,7 +587,7 @@ const mapping = {
|
||||
'D1821': [cfg.light_brightness_colortemp_colorxy],
|
||||
'ZNCLDJ11LM': [cfg.cover_position, cfg.sensor_cover],
|
||||
'LTFY004': [cfg.light_brightness_colorxy],
|
||||
'GL-S-007Z': [cfg.light_brightness_colortemp_colorxy],
|
||||
'GL-S-007Z': [cfg.light_brightness_colorxy_white],
|
||||
'3325-S': [cfg.sensor_temperature, cfg.binary_sensor_occupancy],
|
||||
'4713407': [cfg.light_brightness],
|
||||
'464800': [cfg.light_brightness_colortemp],
|
||||
@@ -600,6 +600,7 @@ const mapping = {
|
||||
'RB 178 T': [cfg.light_brightness_colortemp],
|
||||
'45856GE': [cfg.switch],
|
||||
'GL-D-003Z': [cfg.light_brightness_colortemp_colorxy],
|
||||
'GL-D-005Z': [cfg.light_brightness_colortemp_colorxy],
|
||||
'GD-CZ-006': [cfg.light_brightness],
|
||||
'AIRAM-CTR.U': [],
|
||||
'HGZB-20-DE': [cfg.switch],
|
||||
@@ -608,14 +609,15 @@ const mapping = {
|
||||
'AV2010/32': [],
|
||||
'HGZB-07A': [cfg.light_brightness_colortemp_colorxy],
|
||||
'E1524/E1810': [cfg.sensor_action, cfg.sensor_battery],
|
||||
'GL-C-006/GL-C-009': [cfg.light_brightness_colortemp],
|
||||
'GL-C-006': [cfg.light_brightness_colortemp],
|
||||
'GL-C-007': [cfg.light_brightness_colorxy_white],
|
||||
'100.424.11': [cfg.light_brightness_colortemp],
|
||||
'AC0251100NJ': [cfg.sensor_action, cfg.sensor_battery],
|
||||
'71831': [cfg.light_brightness_colortemp],
|
||||
'404000/404005/404012': [cfg.light_brightness_colortemp_colorxy],
|
||||
'404006/404008/404004': [cfg.light_brightness_colortemp],
|
||||
'MLI-404011': [cfg.sensor_action],
|
||||
'GL-S-003Z': [cfg.light_brightness_colortemp_colorxy],
|
||||
'GL-S-003Z': [cfg.light_brightness_colorxy_white],
|
||||
'HS1DS-E': [cfg.binary_sensor_contact],
|
||||
'SP600': [cfg.switch, cfg.sensor_power],
|
||||
'1613V': [cfg.switch, cfg.sensor_power],
|
||||
@@ -730,10 +732,7 @@ const mapping = {
|
||||
'ZG9101SAC-HP': [cfg.light_brightness],
|
||||
'RS 122': [cfg.light_brightness],
|
||||
'GL-B-001Z': [cfg.light_brightness_colortemp_colorxy],
|
||||
'IM6001-MTP01': [
|
||||
cfg.sensor_temperature, cfg.sensor_battery,
|
||||
cfg.binary_sensor_occupancy,
|
||||
],
|
||||
'IM6001-MTP01': [cfg.sensor_temperature, cfg.sensor_battery, cfg.binary_sensor_occupancy],
|
||||
'U86K31ND6': [switchWithPostfix('left'), switchWithPostfix('right'), switchWithPostfix('center')],
|
||||
'HLD812-Z-SC': [cfg.light_brightness],
|
||||
'HLC610-Z': [cfg.light_brightness],
|
||||
@@ -907,6 +906,9 @@ const mapping = {
|
||||
'8718699688820': [cfg.light_brightness],
|
||||
'GL-W-001Z': [cfg.switch],
|
||||
'E1766': [cfg.sensor_click, cfg.sensor_battery],
|
||||
'929001953101': [cfg.light_brightness_colortemp_colorxy],
|
||||
'8718699673147': [cfg.light_brightness],
|
||||
'3300-P': [cfg.sensor_temperature, cfg.binary_sensor_contact, cfg.sensor_battery],
|
||||
};
|
||||
|
||||
Object.keys(mapping).forEach((key) => {
|
||||
|
||||
Generated
+138
-593
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -44,8 +44,8 @@
|
||||
"rimraf": "*",
|
||||
"semver": "*",
|
||||
"winston": "*",
|
||||
"zigbee-herdsman": "0.8.0",
|
||||
"zigbee-herdsman-converters": "11.1.18"
|
||||
"zigbee-herdsman": "0.8.1",
|
||||
"zigbee-herdsman-converters": "11.1.19"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "*",
|
||||
|
||||
@@ -168,32 +168,6 @@ describe('Entity publish', () => {
|
||||
expect(MQTT.publish.mock.calls[0][2]).toStrictEqual({"qos": 0, "retain": false});
|
||||
});
|
||||
|
||||
it('Should publish messages to zigbee gledopto with [11,13]', async () => {
|
||||
const device = zigbeeHerdsman.devices.GLEDOPTO1112;
|
||||
const endpoint = device.getEndpoint(11);
|
||||
await MQTT.events.message('zigbee2mqtt/led_controller_1/set', JSON.stringify({state: 'OFF'}));
|
||||
await flushPromises();
|
||||
expect(endpoint.command).toHaveBeenCalledTimes(1);
|
||||
expect(endpoint.command).toHaveBeenCalledWith("genOnOff", "off", {}, {disableDefaultResponse: true});
|
||||
expect(MQTT.publish).toHaveBeenCalledTimes(1);
|
||||
expect(MQTT.publish.mock.calls[0][0]).toStrictEqual('zigbee2mqtt/led_controller_1');
|
||||
expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({state: 'OFF'});
|
||||
expect(MQTT.publish.mock.calls[0][2]).toStrictEqual({"qos": 0, "retain": false});
|
||||
});
|
||||
|
||||
it('Should publish messages to zigbee gledopto with [11,12,13]', async () => {
|
||||
const device = zigbeeHerdsman.devices.GLEDOPTO111213;
|
||||
const endpoint = device.getEndpoint(12);
|
||||
await MQTT.events.message('zigbee2mqtt/led_controller_2/set', JSON.stringify({state: 'OFF'}));
|
||||
await flushPromises();
|
||||
expect(endpoint.command).toHaveBeenCalledTimes(1);
|
||||
expect(endpoint.command).toHaveBeenCalledWith("genOnOff", "off", {}, {disableDefaultResponse: true});
|
||||
expect(MQTT.publish).toHaveBeenCalledTimes(1);
|
||||
expect(MQTT.publish.mock.calls[0][0]).toStrictEqual('zigbee2mqtt/led_controller_2');
|
||||
expect(JSON.parse(MQTT.publish.mock.calls[0][1])).toStrictEqual({state: 'OFF'});
|
||||
expect(MQTT.publish.mock.calls[0][2]).toStrictEqual({"qos": 0, "retain": false});
|
||||
});
|
||||
|
||||
it('Should publish messages to zigbee devices with color xy', async () => {
|
||||
const device = zigbeeHerdsman.devices.bulb_color;
|
||||
const endpoint = device.getEndpoint(1);
|
||||
|
||||
@@ -105,8 +105,8 @@ const devices = {
|
||||
'E1743': new Device('Router', '0x0017880104e45540', 6540,4476, [new Endpoint(1, [0], [])], true, "Mains (single phase)", 'TRADFRI on/off switch'),
|
||||
'QBKG04LM': new Device('Router', '0x0017880104e45541', 6549,4151, [new Endpoint(1, [0], []), new Endpoint(2, [0, 6], [])], true, "Mains (single phase)", 'lumi.ctrl_neutral1'),
|
||||
'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], []), new Endpoint(13, [0], [])], true, "Mains (single phase)", 'GLEDOPTO'),
|
||||
'GLEDOPTO111213': new Device('Router', '0x0017880104e45544', 6540,4151, [new Endpoint(11, [0], []), new Endpoint(13, [0], []), new Endpoint(12, [0], [])], true, "Mains (single phase)", 'GLEDOPTO'),
|
||||
'GLEDOPTO1112': new Device('Router', '0x0017880104e45543', 6540,4151, [new Endpoint(11, [0], []), new Endpoint(13, [0], [])], 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'),
|
||||
'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'),
|
||||
|
||||
Reference in New Issue
Block a user