aboutsummaryrefslogtreecommitdiff
path: root/plugin.ts
diff options
context:
space:
mode:
Diffstat (limited to 'plugin.ts')
-rw-r--r--plugin.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugin.ts b/plugin.ts
index b588ac3..20189b1 100644
--- a/plugin.ts
+++ b/plugin.ts
@@ -104,6 +104,10 @@ export default class BekenBridge implements AccessoryPlugin {
}
updateLamp() {
+ if (!this.state.on) {
+ this.lamp.color = [0, 0, 0, 0];
+ return;
+ }
switch (this.state.lamp) {
case 'rgb': {
var rgb = Color({ h: this.state.hue, s: this.state.saturation, v: this.state.brightness });