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,