Skip to content

Commit

Permalink
https://github.com/andreypopov/node-red-contrib-zigbee2mqtt/issues/89
Browse files Browse the repository at this point in the history
  • Loading branch information
andreypopov committed Aug 14, 2022
1 parent e5fbd70 commit 60353ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"name": "node-red-contrib-zigbee2mqtt",
"description": "Zigbee2mqtt connectivity nodes for node-red",
"version": "2.6.1",
"version": "2.6.2",
"dependencies": {
"eventsource": "^2.0.2",
"mqtt": "^4.3.7",
Expand Down
6 changes: 6 additions & 0 deletions resources/Zigbee2mqttHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,12 @@ class Zigbee2mqttHelper {
"TargetPosition": parseInt(payload.position),
"PositionState": payload.running ? 1 : 2 //increasing=1, stopped=2
};
} else if ('position' in payload) { //no position in payload (eg: ikea)
msg["Window"] = msg["WindowCovering"] = msg["Door"] = {
"CurrentPosition": parseInt(payload.position),
"TargetPosition": parseInt(payload.position),
"PositionState": 2 //stopped=2, there is no way to get current motor status
};
}

//TemperatureSensor
Expand Down

0 comments on commit 60353ce

Please sign in to comment.