diff --git a/package.json b/package.json index 01e20bb..8c68885 100755 --- a/package.json +++ b/package.json @@ -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", diff --git a/resources/Zigbee2mqttHelper.js b/resources/Zigbee2mqttHelper.js index a940169..116efc1 100644 --- a/resources/Zigbee2mqttHelper.js +++ b/resources/Zigbee2mqttHelper.js @@ -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