iobroker.zigbee2mqtt 2.4.1 → 2.4.2

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
@@ -9,7 +9,9 @@
9
9
 
10
10
  [![NPM](https://nodei.co/npm/iobroker.zigbee2mqtt.png?downloads=true)](https://nodei.co/npm/iobroker.zigbee2mqtt/)
11
11
 
12
- **Tests:** ![Test and Release](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/workflows/Test%20and%20Release/badge.svg)
12
+ **Tests:**
13
+ ![Test and Release](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/workflows/Test%20and%20Release/badge.svg)
14
+ ![CodeQL](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/actions/workflows/codeql.yml/badge.svg?branch=main)
13
15
 
14
16
  ## zigbee2mqtt adapter for ioBroker
15
17
 
@@ -30,6 +32,11 @@ This adapter allows to control the data points of the devices of a Zigbee2MQTT i
30
32
  Placeholder for the next version (at the beginning of the line):
31
33
  ### **WORK IN PROGRESS**
32
34
  -->
35
+ ### 2.4.2 (2022-11-20)
36
+
37
+ - (o0shojo0o) added correct handling of `move_to_saturation`, `hue_move` and `brightness_move_to_level` ([#68](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/68))
38
+ - (o0shojo0o) fix when `friendly_name` `/` contains
39
+
33
40
  ### 2.4.1 (2022-11-16)
34
41
 
35
42
  - (o0shojo0o) fix based on [review](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1316656378)
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "zigbee2mqtt",
4
- "version": "2.4.1",
4
+ "version": "2.4.2",
5
5
  "news": {
6
+ "2.4.2": {
7
+ "en": "added correct handling of `move_to_saturation`, `hue_move` and `brightness_move_to_level` ([#68](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/68))\nfix when `friendly_name` `/` contains",
8
+ "de": "die korrekte Handhabung von move_to_saturation, hue_move und bright_move_to_level [#68](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/68)\nbei freundlich_name `/` enthält",
9
+ "ru": "добавлена правильная обработка move_to_saturation, hue_move и brightness_move_to_level [#68](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/68)\nисправить, когда friendly_name `/` содержит",
10
+ "pt": "adicionado manuseio correto de move_to_saturation, hue_move e brilho_move_to_level [#68](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/68)\ncorrigir quando friendly_name `/` contém",
11
+ "nl": "voegde de juiste behandeling van verplaatsing, huemove and brightnessmovetolevel 68) (httub /0shojoo-0-Bio-Broctrotqusts)\nvertaling: _",
12
+ "fr": "ajouté correct handling of move_to_saturation, hue_move and brightness_move_to_level [#68](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/68)\nfixer lorsque friendly_name `/` contient",
13
+ "it": "aggiunto corretta gestione di move_to_saturation, hue_move e luminosità_move_to_level [#68](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/68)\nfissare quando amichevole_name `/` contiene",
14
+ "es": "añadido correcto manejo de move_to_saturation, hue_move and brightness_move_to_level [#68](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/68)\narreglar cuando friendly_name `/ contiene",
15
+ "pl": "(Prawdziwa obsługa ruchu_to_saturation, hue_move and brightness_move_to_level #68(https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/68)\nustanowić się, gdy przyjaźnić nazwisko/'. zawierać",
16
+ "uk": "додано правильну обробку рухом_to_saturation, hue_move_move_to_level [#68](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/68)\nфіксація при дружній_ім`я `/` в наявності",
17
+ "zh-cn": "进一步正确地处理搬迁问题:流向、障碍和光明_move_to_级[#68](http://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/68)\nfix 友好时的名称:“/” 内载"
18
+ },
6
19
  "2.4.1": {
7
20
  "en": "fix based on [review](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1316656378)",
8
21
  "de": "(https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1316656378)",
@@ -80,19 +93,6 @@
80
93
  "pl": "wykrywanie zaawansowane, jeśli urządzenie zostało usunięte\numożliwia to błędy projektowe w łączu internetowym",
81
94
  "uk": "розширене виявлення, якщо пристрій було видалено\nвиправлено помилку дизайну в підключенні websocket",
82
95
  "zh-cn": "如果一个装置被拆除,则预先发现\nf 确定网站的设计错误"
83
- },
84
- "2.1.0": {
85
- "en": "added option for color temperature sync with color\nfix logfilter and debugDevices\nlots of bugfixes\nnow set the correct min/max at color temp\nbetter error handling for the connections",
86
- "de": "zusatzoption für farbtemperatur-sync mit farbe\nlogfilter und DebugDevices fixieren\nviele bugfixes\njetzt die richtige min/max in der farbe tempo einstellen\nbessere fehlerbehandlung für die verbindungen",
87
- "ru": "добавлена опция для синхронизации цветовой температуры с цветом\nисправить logfilter и debugDevices\nмного багфиксов\nтеперь установите правильный мин/макс на цветной темп\nлучшая обработка ошибок для подключений",
88
- "pt": "opção adicionada para sincronização de temperatura de cor com cor\ncorrigir logfilter e debugDevices\nlotes de correções de bugs\nagora definir o min/max correto na temperatura de cor\nmelhor manipulação de erros para as conexões",
89
- "nl": "vertaling:\nvertaling:\nveel insectenfixen\nzet nu de juiste min/max op kleurtemperatuur\nbeter fout gaan voor de connecties",
90
- "fr": "option ajoutée pour synchronisation de température couleur avec couleur\nfixer logfilter et debugDevices\nbeaucoup de bugfixes\nmaintenant définir le min/max correct à la température de couleur\nmeilleure manipulation des erreurs pour les connexions",
91
- "it": "opzione aggiunta per la sincronizzazione della temperatura del colore con il colore\ncorreggere logfilter e debugDevices\nmolti bugfix\nora impostare il min/max corretto a temperatura di colore\nmigliore gestione degli errori per le connessioni",
92
- "es": "opción agregada para sincronización de temperatura de color con color\nfijación de logfilter y debugDispositivos\nmuchos bugfixes\nahora establece el min/max correcto a color temp\nmejor manejo de errores para las conexiones",
93
- "pl": "dodano możliwość synchronizacji kolorowej synchronizacji z kolorami\nnaprawić filtry i debugDevices\nwiele błędów\nteraz ustalono odpowiednie min/max w kolorowym tempie\nlepsza obsługa błędów dla połączeń powiązań",
94
- "uk": "додано варіант синхронізації кольору з кольором\nвиправити logfilter і debugDevices\nбагато помилок\nтепер встановлюємо правильний хв/макс за кольором\nкраща обробка помилок для підключення",
95
- "zh-cn": "添加了用颜色的气温合办法\nfix 木图和溶剂\n批发\n现将正确的分钟/升值确定为色色彩。\na. 处理联系的错误"
96
96
  }
97
97
  },
98
98
  "titleLang": {
package/lib/exposes.js CHANGED
@@ -629,7 +629,7 @@ function createFromExposes(deviceID, ieee_address, definitions, power_source, sc
629
629
  },
630
630
  }, expose.access);
631
631
  }
632
- else if (actionName.includes('color_temperature_move')) {
632
+ else if (actionName == 'color_temperature_move') {
633
633
  pushToStates({
634
634
  id: 'color_temperature_move',
635
635
  prop: 'action',
@@ -661,7 +661,7 @@ function createFromExposes(deviceID, ieee_address, definitions, power_source, sc
661
661
  }, expose.access);
662
662
 
663
663
  }
664
- else if (actionName.includes('color_move')) {
664
+ else if (actionName == 'color_move') {
665
665
  pushToStates({
666
666
  id: 'color_move',
667
667
  prop: 'action',
@@ -688,6 +688,85 @@ function createFromExposes(deviceID, ieee_address, definitions, power_source, sc
688
688
  }
689
689
  }, expose.access);
690
690
  }
691
+ else if (actionName == 'brightness_move_to_level') {
692
+ pushToStates({
693
+ id: 'brightness_move_to_level',
694
+ name: 'Brightness move to level',
695
+ icon: undefined,
696
+ role: 'level.dimmer',
697
+ write: false,
698
+ read: true,
699
+ type: 'number',
700
+ min: 0,
701
+ max: 100,
702
+ def: 100,
703
+ unit: '%',
704
+ isEvent: true,
705
+ getter: (payload) => {
706
+ if (payload.action != 'brightness_move_to_level') {
707
+ return undefined;
708
+ }
709
+
710
+ if (payload.action_level) {
711
+ return utils.bulbLevelToAdapterLevel(payload.action_level);
712
+ } else {
713
+ return undefined;
714
+ }
715
+ }
716
+ }, expose.access);
717
+ }
718
+ else if (actionName == 'move_to_saturation') {
719
+ pushToStates({
720
+ id: 'move_to_saturation',
721
+ name: 'Move to level saturation',
722
+ icon: undefined,
723
+ role: 'level.color.saturation',
724
+ write: false,
725
+ read: true,
726
+ type: 'number',
727
+ // min: 0,
728
+ // max: 100,
729
+ def: 0,
730
+ isEvent: true,
731
+ getter: (payload) => {
732
+ if (payload.action != 'move_to_saturation') {
733
+ return undefined;
734
+ }
735
+
736
+ if (payload.action_level) {
737
+ return payload.action_saturation;
738
+ } else {
739
+ return undefined;
740
+ }
741
+ }
742
+ }, expose.access);
743
+ }
744
+ else if (actionName == 'hue_move') {
745
+ pushToStates({
746
+ id: 'hue_move',
747
+ name: 'Hue move rate',
748
+ icon: undefined,
749
+ role: 'level.color.hue',
750
+ write: false,
751
+ read: true,
752
+ type: 'number',
753
+ min: 0,
754
+ max: 360,
755
+ def: 0,
756
+ isEvent: true,
757
+ getter: (payload) => {
758
+ if (payload.action != 'hue_move') {
759
+ return undefined;
760
+ }
761
+
762
+ if (payload.action_level) {
763
+ return payload.action_rate;
764
+ } else {
765
+ return undefined;
766
+ }
767
+ }
768
+ }, expose.access);
769
+ }
691
770
  else {
692
771
  pushToStates({
693
772
  id: actionName.replace(/\*/g, ''),
package/main.js CHANGED
@@ -209,9 +209,9 @@ class Zigbee2mqtt extends core.Adapter {
209
209
  statesController.processDeviceMessage(newMessage);
210
210
  }
211
211
  // States
212
- } else if (!messageObj.topic.includes('/')) {
213
- statesController.processDeviceMessage(messageObj);
212
+ } else {
214
213
  //console.log(JSON.stringify(messageObj));
214
+ statesController.processDeviceMessage(messageObj);
215
215
  }
216
216
  }
217
217
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.zigbee2mqtt",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "description": "Zigbee2MQTT adapter for ioBroker",
5
5
  "author": {
6
6
  "name": "Dennis Rathjen",
@@ -42,7 +42,7 @@
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.27.0",
45
+ "eslint": "^8.28.0",
46
46
  "eslint-config-prettier": "^8.5.0",
47
47
  "eslint-plugin-prettier": "^4.2.1",
48
48
  "mocha": "^10.1.0",
@@ -50,7 +50,7 @@
50
50
  "proxyquire": "^2.1.3",
51
51
  "sinon": "^14.0.2",
52
52
  "sinon-chai": "^3.7.0",
53
- "typescript": "~4.8.4"
53
+ "typescript": "~4.9.3"
54
54
  },
55
55
  "main": "main.js",
56
56
  "files": [