fix for setting the colour of the lights
This commit is contained in:
parent
90b5829e1e
commit
07ee9eb4d5
@ -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);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user