Skip to content

Commit

Permalink
This support treating Color items as dimmers, hopefully Alexa adds ot…
Browse files Browse the repository at this point in the history
…her real color support soon. Fixes #13. (#24)

Signed-off-by: Dan Cunningham <[email protected]>
  • Loading branch information
digitaldan authored Apr 27, 2017
1 parent 67c69c4 commit 6b5bb75
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion oh2.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,15 @@ function getSwitchableActions(item) {
"turnOn",
"turnOff"
];
} else if (item.type === "Color" ||
(item.type === "Group" && item.groupType && item.groupType === "Color")) {
actions = [
"incrementPercentage",
"decrementPercentage",
"setPercentage",
"turnOn",
"turnOff"
];
} else if (item.type === "Rollershutter" ||
(item.type === "Group" && item.groupType && item.groupType === "Rollershutter")) {
actions = [
Expand All @@ -557,7 +566,6 @@ function getSwitchableActions(item) {
"decrementPercentage"
];
}

return actions;
}
/**
Expand Down

0 comments on commit 6b5bb75

Please sign in to comment.