iobroker.zigbee2mqtt 2.4.3 → 2.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -32,6 +32,14 @@ This adapter allows to control the data points of the devices of a Zigbee2MQTT i
32
32
  Placeholder for the next version (at the beginning of the line):
33
33
  ### **WORK IN PROGRESS**
34
34
  -->
35
+ ### 2.4.5 (2022-12-20)
36
+
37
+ - (o0shojo0o) extend 'text' for 'action' ([#84](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/84))
38
+
39
+ ### 2.4.4 (2022-12-06)
40
+
41
+ - (o0shojo0o) better state identification ([#79](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/79))
42
+
35
43
  ### 2.4.3 (2022-11-23)
36
44
 
37
45
  - (o0shojo0o) fix availability when `friendly_name` `/` contains
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "zigbee2mqtt",
4
- "version": "2.4.3",
4
+ "version": "2.4.5",
5
5
  "news": {
6
+ "2.4.5": {
7
+ "en": "extend 'text' for 'action' ([#84](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/84))",
8
+ "de": "text für die Aktion #[84](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/84)",
9
+ "ru": "расширить текст для действия #[84](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/84)",
10
+ "pt": "extensão do texto para a ação #[84](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/84)",
11
+ "nl": "quality over Quantity (QoQ) Releases Vertaling:",
12
+ "fr": "extension text for action #[84](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/84)",
13
+ "it": "estendere il testo all'azione #[84](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/84)",
14
+ "es": "extensión text for action #[84](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/84)",
15
+ "pl": "tekst do akcji #84 (https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/84)",
16
+ "uk": "javaScript licenses API Веб-сайт Go1.13.8",
17
+ "zh-cn": "行动案文[84](http://github.com/oshojo0o/ioBroker.zigbee2mqt/issues/84)"
18
+ },
19
+ "2.4.4": {
20
+ "en": "better state identification ([#79](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/79))",
21
+ "de": "bessere Zustandserkennung #[79](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/79)",
22
+ "ru": "лучшая государственная идентификация #[79](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/79)",
23
+ "pt": "melhor identificação do estado #[79](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/79)",
24
+ "nl": "identificatie van de staat is beter",
25
+ "fr": "meilleure identification de l ' État #[79](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/79)",
26
+ "it": "migliore identificazione dello stato #[79](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/79)",
27
+ "es": "mejor identificación estatal #[79](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/79)",
28
+ "pl": "zobacz też: #79 (https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/79)",
29
+ "uk": "[79] (https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/79)",
30
+ "zh-cn": "更好的国家辨认(http://github.com/oshojo0o/ioBroker.zigbee2mqt/issues/79)"
31
+ },
6
32
  "2.4.3": {
7
33
  "en": "fix availability when `friendly_name` `/` contains",
8
34
  "de": "verfügbarkeit korrigieren bei friendly_name `/` enthält",
@@ -67,32 +93,6 @@
67
93
  "pl": "dodał wsparcie dla porozumień stanów, które to wspierają.\ndodano poprawne zachowanie koloru i kolor_temperature_move",
68
94
  "uk": "додана підтримка для тягових станів, які підтримують це.\nдодано правильну обробку кольором_move та color_ infrastructure_move",
69
95
  "zh-cn": "此外,还支持支持这一国家。.\n· 删除白色、流血和色色色色色彩。"
70
- },
71
- "2.2.1": {
72
- "en": "fix state roles and access\nfix state handling\nfix createZ2MMessage",
73
- "de": "zustandsrollen und zugriff beheben\nmanuelle zustandsbearbeitung\nfix erstellenZ2MMessage",
74
- "ru": "исправить государственные роли и доступ\nисправить государственную обработку\nисправить CreateZ2MMessage",
75
- "pt": "corrigir funções estaduais e acesso\ncorrigir o manuseio do estado\ncorrigir createZ2MMessage",
76
- "nl": "vertaling:\nvertaling:\nvertaling:",
77
- "fr": "fixer les rôles de l'état et l'accès\nmaniement de l ' état\nfix createZ2MMessage",
78
- "it": "fissare i ruoli dello stato e l'accesso\ncorretta gestione dello stato\nfix createZ2MMessage",
79
- "es": "fijar funciones estatales y acceso\ncorrección del estado\nfix createZ2MMessage",
80
- "pl": "uchwała rola państwowa i dostęp\nnaprawa\ntworzenie Z2MM",
81
- "uk": "фіксувати державні ролі і доступ\nфіксувати стан обробки\nфіксатор творуZ2MMessage",
82
- "zh-cn": "fix 国家作用和准入\nfix 国家处理\nfix 建立Z2MMessage"
83
- },
84
- "2.2.0": {
85
- "en": "added support for [Lidl HG06467 effects](https://www.zigbee2mqtt.io/devices/HG06467.html#trigger-effects)\nadded support for hs color\nsimulated_brightness data point is added only for supported devices",
86
- "de": "unterstützung für [Lidl HG06467-Effekte](https://www.zigbee2mqt.io/devices/HG06467.html#trigger-Effekte)\nunterstützung für hs farbe\nsimuld_brightness-datenpunkt wird nur für unterstützte geräte hinzugefügt",
87
- "ru": "добавлена поддержка [Lidl HG06467 effects](https://www.zigbee2mqtt.io/devices/HG06467.html#trigger-effects)\nдобавлена поддержка цвета hs\nsimulated_brightness дата точка добавлена только для поддерживаемых устройств",
88
- "pt": "apoio adicional para efeitos [Lidl HG06467](https://www.zigbee2mqtt.io/devices/HG06467.html#trigger-effects)\nsuporte adicionado para cor hs\nsimulated_brightness data point é adicionado apenas para dispositivos suportados",
89
- "nl": "quality over Quantity (QoQ) Releases Vertaling:\nvertaling:\nvertaling:",
90
- "fr": "ajouté support for [Lidl HG06467 effects](https://www.zigbee2mqt.io/devices/HG06467.html#trigger-effects)\nsupport ajouté pour la couleur hs\nsimuld_brightness data point est ajouté seulement pour les appareils pris en charge",
91
- "it": "[Lidl HG06467 Effects](https://www.zigbee2mqtt.io/devices/HG06467.html#trigger-effetti)\nsupporto aggiunto per il colore hs\nil punto di dati simulated_brightness viene aggiunto solo per i dispositivi supportati",
92
- "es": "[Lidl HG06467 effects](https://www.zigbee2mqtt.io/devices/HG06467.html#trigger-effects)\nsoporte añadido para el color hs\nsimulated_brightness punto de datos se añade sólo para dispositivos compatibles",
93
- "pl": "dodano wsparcie dla Lidla HG06467 efektów (https:/wwww.zigbee2mqtt.io/devices/HG06467.html#trigger)\ndodano obsługę koloru hs\nsymulacja danych _brighta jest dodana tylko dla obsługi urządzeń",
94
- "uk": "додано підтримку [Lidl HG06467 ефектів](https://www.zigbee2mqtt.io/devices/HG06467.html#trigger-effects)\nдодана підтримка кольору hs\nсимулятор_brightness дата додано тільки для підтримуваних пристроїв",
95
- "zh-cn": "进一步支持[Lidl HG06467效应](http://www.zigbee2mqt.io/devices/HG06467.html#er-effects)\nb. 对地壳的增援\n仅为支助装置增添了简历数据点。"
96
96
  }
97
97
  },
98
98
  "titleLang": {
package/lib/exposes.js CHANGED
@@ -90,7 +90,7 @@ function genState(expose, role, name, desc) {
90
90
  write: writable,
91
91
  read: true,
92
92
  type: 'number',
93
- min: expose.value_min || 0,
93
+ min: expose.value_min,
94
94
  max: expose.value_max,
95
95
  unit: expose.unit,
96
96
  };
@@ -143,12 +143,15 @@ function genState(expose, role, name, desc) {
143
143
  id: stateId,
144
144
  prop: propName,
145
145
  name: stateName,
146
- icon: undefined,
147
146
  role: role || 'state',
148
147
  write: writable,
149
148
  read: true,
150
149
  type: 'string',
151
150
  };
151
+ if (propName == 'action') {
152
+ state.isEvent = true;
153
+ state.getter = (payload) => { return payload[propName]; };
154
+ }
152
155
  if (expose.endpoint) {
153
156
  state.epname = expose.endpoint;
154
157
  }
@@ -74,7 +74,11 @@ class StatesController {
74
74
  // Is not an action
75
75
  else {
76
76
  for (const [key, value] of Object.entries(messageObj.payload)) {
77
- const state = device.states.find(x => (x.prop && x.prop == key) || x.id == key);
77
+ let state = device.states.find(x => x.prop && x.prop == key);
78
+
79
+ if (!state) {
80
+ state = device.states.find(x => x.id == key);
81
+ }
78
82
 
79
83
  if (!state) {
80
84
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.zigbee2mqtt",
3
- "version": "2.4.3",
3
+ "version": "2.4.5",
4
4
  "description": "Zigbee2MQTT adapter for ioBroker",
5
5
  "author": {
6
6
  "name": "Dennis Rathjen",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@iobroker/adapter-core": "^2.6.7",
23
- "aedes": "^0.48.0",
23
+ "aedes": "^0.48.1",
24
24
  "aedes-persistence-nedb": "^2.0.3",
25
25
  "mqtt": "^4.3.7",
26
26
  "net": "^1.0.2",
@@ -35,22 +35,22 @@
35
35
  "@tsconfig/node14": "^1.0.3",
36
36
  "@types/chai": "^4.3.4",
37
37
  "@types/chai-as-promised": "^7.1.5",
38
- "@types/mocha": "^10.0.0",
39
- "@types/node": "^18.11.9",
38
+ "@types/mocha": "^10.0.1",
39
+ "@types/node": "^18.11.17",
40
40
  "@types/proxyquire": "^1.3.28",
41
41
  "@types/sinon": "^10.0.13",
42
42
  "@types/sinon-chai": "^3.2.9",
43
43
  "chai": "^4.3.7",
44
44
  "chai-as-promised": "^7.1.1",
45
- "eslint": "^8.28.0",
45
+ "eslint": "^8.30.0",
46
46
  "eslint-config-prettier": "^8.5.0",
47
47
  "eslint-plugin-prettier": "^4.2.1",
48
- "mocha": "^10.1.0",
49
- "prettier": "^2.7.1",
48
+ "mocha": "^10.2.0",
49
+ "prettier": "^2.8.1",
50
50
  "proxyquire": "^2.1.3",
51
- "sinon": "^14.0.2",
51
+ "sinon": "^15.0.1",
52
52
  "sinon-chai": "^3.7.0",
53
- "typescript": "~4.9.3"
53
+ "typescript": "~4.9.4"
54
54
  },
55
55
  "main": "main.js",
56
56
  "files": [