fixed some more bugs related to the effects
This commit is contained in:
parent
49aaf848d3
commit
6b6b346e09
@ -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);
|
||||
|
||||
@ -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": {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user