diff options
author | lonkaars <loek@pipeframe.xyz> | 2021-08-06 22:29:19 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2021-08-06 22:29:19 +0200 |
commit | 7124470a672206aa49a6ee3e48d1a9bd58b50228 (patch) | |
tree | 22297d89e04320947275ba66b8f97501cdf1ab8e | |
parent | 9ed98f43d7b80364cc9004e6bf374ef610a5a0e3 (diff) |
small fix
-rw-r--r-- | plugin.ts | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 }); |