diff --git a/HCschalkematrix.js b/HCschalkematrix.js index 0fa5e70..c9053a6 100644 --- a/HCschalkematrix.js +++ b/HCschalkematrix.js @@ -107,7 +107,7 @@ class HCschalkematrix extends HCColorLamp { // try to match the effect as best as possible if (speeds[msg.effect] != undefined) { if (speeds[msg.effect].length == 1) { - newState.effect = speeds[msg.effect][0][1]; + newState.effect = speeds[msg.effect][0].id; } else { let lowestDist = Infinity; let lowestDistId = null; @@ -121,6 +121,8 @@ class HCschalkematrix extends HCColorLamp { newState.effect = lowestDistId; } + } else if (msg.effect == 0) { + newState.effect = "none"; } this._sumanager.insertConfirmedState(newState); diff --git a/package.json b/package.json index 7d4ffdc..cb8b9be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hc-schalkematrix", - "version": "1.0.0", + "version": "1.0.1", "description": "A homecontrol control which interfaces with the LED matrix panel I made", "main": "HCschalkematrix.js", "scripts": {