From 7124470a672206aa49a6ee3e48d1a9bd58b50228 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Fri, 6 Aug 2021 22:29:19 +0200 Subject: small fix --- plugin.ts | 4 ++++ 1 file changed, 4 insertions(+) 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 }); -- cgit v1.2.3