From 8d9015ddff1ef4fe1f65bdae3f3dbef238234980 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Fri, 6 Aug 2021 22:41:25 +0200 Subject: more small fixes (finally works flawlessly) --- package.json | 2 +- plugin.ts | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index f513621..9778bc0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "displayName": "Beken LED Homebridge plugin", "name": "homebridge-beken", - "version": "0.1.2", + "version": "0.1.3", "description": "homebridge beken led plugin", "author": "lonkaars ", "license": "MIT", diff --git a/plugin.ts b/plugin.ts index 20189b1..ec8d790 100644 --- a/plugin.ts +++ b/plugin.ts @@ -49,9 +49,6 @@ export default class BekenBridge implements AccessoryPlugin { registerWhiteBulbServices() { var done = () => { - if (this.state.lamp == 'rgb') { - this.RGBBulbService.getCharacteristic(this.api.hap.Characteristic.On).setValue(false); - } this.state.lamp = 'white'; this.updateLamp(); }; @@ -71,9 +68,6 @@ export default class BekenBridge implements AccessoryPlugin { registerRGBBulbServices() { var done = () => { - if (this.state.lamp == 'white') { - this.whiteBulbService.getCharacteristic(this.api.hap.Characteristic.On).setValue(false); - } this.state.lamp = 'rgb'; this.updateLamp(); }; @@ -104,6 +98,7 @@ export default class BekenBridge implements AccessoryPlugin { } updateLamp() { + this.log.info(JSON.stringify(this.state, null, 2)); if (!this.state.on) { this.lamp.color = [0, 0, 0, 0]; return; -- cgit v1.2.3