From e1ac0a3a5b40243fbc5c24332e02747a8e92fc33 Mon Sep 17 00:00:00 2001 From: Brandon Watson Date: Sun, 30 Oct 2022 10:47:08 -0500 Subject: [PATCH] Only control wiz lights if they are already on --- src/fluxAccessory.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fluxAccessory.ts b/src/fluxAccessory.ts index ec1a6e5..efe7f91 100644 --- a/src/fluxAccessory.ts +++ b/src/fluxAccessory.ts @@ -331,8 +331,9 @@ export class FluxAccessory { } catch (err: any) { this._platform.log.error(err.message); } - if (pilot) { + if (pilot && pilot.state) { this._platform.log.info(`Adjusting wiz bulb: ${wizBulb.getMac()}`); + await wizBulb.set( this._wizRGB, on ? 100 : pilot.dimming,