diff --git a/lib/light-controller.js b/lib/light-controller.js index 658b7bf..c225d9c 100644 --- a/lib/light-controller.js +++ b/lib/light-controller.js @@ -3,6 +3,7 @@ const client = new LifxClient(); const em = require('events').EventEmitter; const util = require('util'); const logger = require('log4js').getLogger('Lights'); + logger.level = 'debug'; const LightController = function() { @@ -80,9 +81,10 @@ const LightController = function() { }); this.on('setColour', (data) => { - const wLight = devices.get(data.id); + const wLight = client.devices[data.id]; if (wLight) { logger.info('Setting color of ', wLight.label); + // logger.debug(wLight); wLight.color(data.color.hue, data.color.saturation, data.color.brightness, data.color.kelvin); } });