Update zigbee-shepherd-converters to 7.0.1

This commit is contained in:
Koen Kanters
2018-12-06 21:09:21 +01:00
parent 65526e7f68
commit a13bd85ef3
10 changed files with 66 additions and 24 deletions
+38
View File
@@ -1426,6 +1426,8 @@ light:
command_topic: "zigbee2mqtt/<FRIENDLY_NAME>/set"
```
### AC01353010G
```yaml
### HALIGHTDIMWWE27
```yaml
light:
@@ -1976,6 +1978,42 @@ switch:
command_topic: "zigbee2mqtt/<FRIENDLY_NAME>/set"
```
### 3326-L
```yaml
binary_sensor:
- platform: "mqtt"
state_topic: "zigbee2mqtt/<FRIENDLY_NAME>"
availability_topic: "zigbee2mqtt/bridge/state"
payload_on: true
payload_off: false
value_template: "{{ value_json.occupancy }}"
device_class: "motion"
sensor:
- platform: "mqtt"
state_topic: "zigbee2mqtt/<FRIENDLY_NAME>"
availability_topic: "zigbee2mqtt/bridge/state"
unit_of_measurement: "°C"
device_class: "temperature"
value_template: "{{ value_json.temperature }}"
json_attributes:
- "linkquality"
- "battery"
- "voltage"
```
### 3320-L
```yaml
binary_sensor:
- platform: "mqtt"
state_topic: "zigbee2mqtt/<FRIENDLY_NAME>"
availability_topic: "zigbee2mqtt/bridge/state"
payload_on: false
payload_off: true
value_template: "{{ value_json.contact }}"
device_class: "door"
```
### KS-SM001
```yaml
switch:
+4 -1
View File
@@ -1,6 +1,6 @@
*NOTE: This file has been generated, do not edit this file manually!*
Currently **134** devices are supported from **29** different vendors.
Currently **137** devices are supported from **29** different vendors.
In case you own a Zigbee device which is **NOT** listed here, please see
[How to support new devices](https://github.com/Koenkk/zigbee2mqtt/wiki/How-to-support-new-devices).
@@ -130,6 +130,8 @@ In case you own a Zigbee device which is **NOT** listed here, please see
| Model | Description | Picture |
| ------------- | ------------- | -------------------------- |
| 3210-L | Iris Smart plug (on/off) | ![https://github.com/Koenkk/zigbee2mqtt/raw/dev/images/devices/3210-L.jpg](https://github.com/Koenkk/zigbee2mqtt/raw/dev/images/devices/3210-L.jpg) |
| 3326-L | Iris Motion sensor (occupancy and temperature) | ![https://github.com/Koenkk/zigbee2mqtt/raw/dev/images/devices/3326-L.jpg](https://github.com/Koenkk/zigbee2mqtt/raw/dev/images/devices/3326-L.jpg) |
| 3320-L | Iris Contact sensor (contact) | ![https://github.com/Koenkk/zigbee2mqtt/raw/dev/images/devices/3320-L.jpg](https://github.com/Koenkk/zigbee2mqtt/raw/dev/images/devices/3320-L.jpg) |
### JIAWEN
@@ -183,6 +185,7 @@ In case you own a Zigbee device which is **NOT** listed here, please see
| 4058075036147 | OSRAM Smart+ Gardenpole RGBW (on/off, brightness, color temperature, color xy) | ![https://github.com/Koenkk/zigbee2mqtt/raw/dev/images/devices/4058075036147.jpg](https://github.com/Koenkk/zigbee2mqtt/raw/dev/images/devices/4058075036147.jpg) |
| AB35996 | OSRAM Smart+ Spot GU10 Multicolor (on/off, brightness, color temperature, color xy) | ![https://github.com/Koenkk/zigbee2mqtt/raw/dev/images/devices/AB35996.jpg](https://github.com/Koenkk/zigbee2mqtt/raw/dev/images/devices/AB35996.jpg) |
| AC08562 | OSRAM SMART+ Candle E14 Dimmable White (on/off, brightness) | ![https://github.com/Koenkk/zigbee2mqtt/raw/dev/images/devices/AC08562.jpg](https://github.com/Koenkk/zigbee2mqtt/raw/dev/images/devices/AC08562.jpg) |
| AC01353010G | OSRAM SMART+ Motion Sensor (occupancy and temperature) | ![https://github.com/Koenkk/zigbee2mqtt/raw/dev/images/devices/AC01353010G.jpg](https://github.com/Koenkk/zigbee2mqtt/raw/dev/images/devices/AC01353010G.jpg) |
### Paulmann
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

+2 -2
View File
@@ -115,14 +115,14 @@ class DevicePublish {
// For each key in the JSON message find the matching converter.
Object.keys(json).forEach((key) => {
const converter = model.toZigbee.find((c) => c.key === key);
const converter = model.toZigbee.find((c) => c.key.includes(key));
if (!converter) {
logger.error(`No converter available for '${key}' (${json[key]})`);
return;
}
// Converter didn't return a result, skip
const converted = converter.convert(json[key], json, topic.type);
const converted = converter.convert(key, json[key], json, topic.type);
if (!converted) {
return;
}
+1
View File
@@ -403,6 +403,7 @@ const mapping = {
'PSS-23ZBS': [configurations.switch],
'HS1SA': [configurations.binary_sensor_smoke],
'Z01-A19NAE26': [configurations.light_brightness_colortemp],
'AC01353010G': [configurations.binary_sensor_occupancy, configurations.sensor_temperature],
};
/**
+18 -18
View File
@@ -14,12 +14,12 @@
}
},
"@babel/generator": {
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.1.6.tgz",
"integrity": "sha512-brwPBtVvdYdGxtenbQgfCdDPmtkmUBZPjUoK5SXJEBuHaA5BCubh9ly65fzXz7R6o5rA76Rs22ES8Z+HCc0YIQ==",
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.2.0.tgz",
"integrity": "sha512-BA75MVfRlFQG2EZgFYIwyT1r6xSkwfP2bdkY/kLZusEYWiJs4xCowab/alaEaT0wSvmVuXGqiefeBlP+7V1yKg==",
"dev": true,
"requires": {
"@babel/types": "^7.1.6",
"@babel/types": "^7.2.0",
"jsesc": "^2.5.1",
"lodash": "^4.17.10",
"source-map": "^0.5.0",
@@ -67,9 +67,9 @@
}
},
"@babel/parser": {
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.1.6.tgz",
"integrity": "sha512-dWP6LJm9nKT6ALaa+bnL247GHHMWir3vSlZ2+IHgHgktZQx0L3Uvq2uAWcuzIe+fujRsYWBW2q622C5UvGK9iQ==",
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.2.0.tgz",
"integrity": "sha512-M74+GvK4hn1eejD9lZ7967qAwvqTZayQa3g10ag4s9uewgR7TKjeaT0YMyoq+gVfKYABiWZ4MQD701/t5e1Jhg==",
"dev": true
},
"@babel/template": {
@@ -118,9 +118,9 @@
}
},
"@babel/types": {
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.1.6.tgz",
"integrity": "sha512-DMiUzlY9DSjVsOylJssxLHSgj6tWM9PRFJOGW/RaOglVOK9nzTxoOMfTfRQXGUCUQ/HmlG2efwC+XqUEJ5ay4w==",
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.2.0.tgz",
"integrity": "sha512-b4v7dyfApuKDvmPb+O488UlGuR1WbwMXFsO/cyqMrnfvRAChZKJAYeeglWTjUO1b9UghKKgepAQM5tsvBJca6A==",
"dev": true,
"requires": {
"esutils": "^2.0.2",
@@ -1887,7 +1887,7 @@
},
"json2yaml": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/json2yaml/-/json2yaml-1.1.0.tgz",
"resolved": "http://registry.npmjs.org/json2yaml/-/json2yaml-1.1.0.tgz",
"integrity": "sha1-VBTZB/mBZYa4DFE+wuOusquBmmw=",
"requires": {
"remedial": "1.x"
@@ -3650,9 +3650,9 @@
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
},
"progress": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.1.tgz",
"integrity": "sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==",
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
"integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
"dev": true
},
"promirepl": {
@@ -4621,7 +4621,7 @@
},
"underscore": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz",
"resolved": "http://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz",
"integrity": "sha1-YaajIBBiKvoHljvzJSA88SI51gQ="
},
"unique-stream": {
@@ -4821,9 +4821,9 @@
}
},
"zigbee-shepherd-converters": {
"version": "6.0.7",
"resolved": "https://registry.npmjs.org/zigbee-shepherd-converters/-/zigbee-shepherd-converters-6.0.7.tgz",
"integrity": "sha512-/LudDhZMQHG1XByAIX+y/BtJI/W2C02cnTMmqm0Sq8Oy3swQnVuy1ETdwMEqGINWbWhcLmKXne0PN1ywnzELxw==",
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/zigbee-shepherd-converters/-/zigbee-shepherd-converters-7.0.1.tgz",
"integrity": "sha512-VQfwtzfIrwzYbuU1oSpsBpx6bp6qshSPZO+Z9jTIGYu/xzjMStv93JeMk2n26cQvrhmh2fx8NH9+D+dFVaxqzA==",
"requires": {
"debounce": "*",
"debug": "3.2.6",
+1 -1
View File
@@ -44,7 +44,7 @@
"rimraf": "*",
"winston": "2.4.2",
"zigbee-shepherd": "git+https://github.com/Koenkk/zigbee-shepherd.git#ce52ac4131e2a505af6197b4a26d2b5360e4eb80",
"zigbee-shepherd-converters": "6.0.7",
"zigbee-shepherd-converters": "7.0.1",
"ziee": "*",
"zive": "*"
},
+2 -2
View File
@@ -53,7 +53,7 @@ describe('DevicePublish', () => {
it('Should publish messages to zigbee devices when brightness is in %', () => {
zigbee.publish.resetHistory();
zigbee.getDevice = sinon.fake.returns({modelId: 'TRADFRI bulb E27 CWS opal 600lm'});
devicePublish.onMQTTMessage('zigbee2mqtt/0x12345678/set', JSON.stringify({brightness: '92%'}));
devicePublish.onMQTTMessage('zigbee2mqtt/0x12345678/set', JSON.stringify({brightness_percent: '92'}));
chai.assert.isTrue(zigbee.publish.calledOnce);
chai.assert.strictEqual(zigbee.publish.getCall(0).args[0], '0x12345678');
chai.assert.strictEqual(zigbee.publish.getCall(0).args[1], 'genLevelCtrl');
@@ -95,7 +95,7 @@ describe('DevicePublish', () => {
it('Should publish messages to zigbee devices with color_temp in %', () => {
zigbee.publish.resetHistory();
zigbee.getDevice = sinon.fake.returns({modelId: 'TRADFRI bulb E27 CWS opal 600lm'});
devicePublish.onMQTTMessage('zigbee2mqtt/0x12345678/set', JSON.stringify({color_temp: '100%'}));
devicePublish.onMQTTMessage('zigbee2mqtt/0x12345678/set', JSON.stringify({color_temp_percent: '100'}));
chai.assert.isTrue(zigbee.publish.calledOnce);
chai.assert.strictEqual(zigbee.publish.getCall(0).args[0], '0x12345678');
chai.assert.strictEqual(zigbee.publish.getCall(0).args[1], 'lightingColorCtrl');