iobroker.zigbee2mqtt 3.0.18 → 3.0.19

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
@@ -22,6 +22,9 @@ This adapter allows to control the data points of the devices of a Zigbee2MQTT i
22
22
  [Adapter Documentation](https://github.com/arteck/ioBroker.zigbee2mqtt/blob/main/docs/wiki.md)
23
23
 
24
24
  ## Changelog
25
+ ### 3.0.19 (2026-01-28)
26
+ * (arteck) modify action dp
27
+
25
28
  ### 3.0.18 (2026-01-28)
26
29
  * (arteck) typo
27
30
 
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "zigbee2mqtt",
4
- "version": "3.0.18",
4
+ "version": "3.0.19",
5
5
  "news": {
6
+ "3.0.19": {
7
+ "en": "modify action dp",
8
+ "de": "änderung der aktion dp",
9
+ "ru": "модифицировать действие dp",
10
+ "pt": "modificar ação dp",
11
+ "nl": "actie dp wijzigen",
12
+ "fr": "modifier l'action dp",
13
+ "it": "modificare l'azione",
14
+ "es": "modificar la acción dp",
15
+ "pl": "modyfikacja działania dp",
16
+ "uk": "змінити дію dp",
17
+ "zh-cn": "修改动作 dp"
18
+ },
6
19
  "3.0.18": {
7
20
  "en": "typo",
8
21
  "de": "typo",
@@ -80,19 +93,6 @@
80
93
  "pl": "dodaj działanie dp",
81
94
  "uk": "додати дію dp",
82
95
  "zh-cn": "添加动作 dp"
83
- },
84
- "3.0.12": {
85
- "en": "Dependencies have been updated\ntypo fix",
86
- "de": "Abhängigkeiten wurden aktualisiert\ntypo fix",
87
- "ru": "Зависимости были обновлены\nисправление опечаток",
88
- "pt": "As dependências foram atualizadas\nerro de digitação",
89
- "nl": "Afhankelijkheden zijn bijgewerkt\ntypo-fix",
90
- "fr": "Les dépendances ont été actualisées\ncorrection du type",
91
- "it": "Le dipendenze sono state aggiornate\ncorrezione di errore",
92
- "es": "Se han actualizado las dependencias\ntypo fix",
93
- "pl": "Zaktualizowano zależności\nfix typo",
94
- "uk": "Залежність було оновлено\nтипофікс",
95
- "zh-cn": "依赖关系已更新\n类型修复"
96
96
  }
97
97
  },
98
98
  "messages": [
package/lib/exposes.js CHANGED
@@ -762,6 +762,7 @@ async function createDeviceFromExposes(devicesMessag, adapter) {
762
762
  // generate an 'action' state
763
763
  state = genState(expose);
764
764
  state.isEvent = true;
765
+ state.getter = (payload) => payload.action;
765
766
  pushToStates(state, expose.access);
766
767
  state = null;
767
768
 
@@ -149,19 +149,19 @@ class StatesController {
149
149
  const stateName = `${device.ieee_address}.${state.id}`;
150
150
 
151
151
  try {
152
- if (state.isEvent && state.isEvent == true) {
153
- if (state.type == 'boolean') {
154
- await this.setStateWithTimeoutAsync(stateName, state.getter(messageObj.payload), 450);
152
+ const getterPayload = state.getter(messageObj.payload);
153
+ if (getterPayload != undefined) {
154
+ if (state.isEvent && state.isEvent == true) {
155
+ if (state.type == 'boolean') {
156
+ await this.setStateWithTimeoutAsync(stateName, getterPayload, 250);
157
+
158
+ } else {
159
+ await this.setStateSafelyAsync(stateName, getterPayload);
160
+ }
155
161
  } else {
156
- await this.setStateSafelyAsync(stateName, state.getter(messageObj.payload));
162
+ await this.setStateChangedSafelyAsync(stateName, getterPayload);
157
163
  }
158
- // publish the action into action dp
159
- if (state.prop && state.prop == 'action') {
160
- await this.setStateSafelyAsync(`${device.ieee_address}.action`, messageObj.payload.action);
161
- }
162
- } else {
163
- await this.setStateChangedSafelyAsync(stateName, state.getter(messageObj.payload));
164
- }
164
+ }
165
165
  } catch (err) {
166
166
  incStatsQueue[incStatsQueue.length] = messageObj;
167
167
  this.adapter.log.debug(`Can not set ${stateName}, queue state in incStatsQueue!`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.zigbee2mqtt",
3
- "version": "3.0.18",
3
+ "version": "3.0.19",
4
4
  "description": "Zigbee2MQTT adapter for ioBroker",
5
5
  "author": {
6
6
  "name": "Dennis Rathjen and Arthur Rupp",