Skip to content

Commit c874f26

Browse files
committed
Inspect the bulb, not the name of the bulb
Inspecting b.name always just gave me "undefined". It seems better to inspect the whole bulb to get its complete status.
1 parent 6496b69 commit c874f26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cli2.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ var timing = 0;
88
var lx = lifx.init();
99

1010
lx.on('bulbstate', function(b) {
11-
console.log('Bulb state: ' + util.inspect(b.name));
11+
console.log('Bulb state: ' + util.inspect(b));
1212
});
1313
lx.on('bulbonoff', function(b) {
14-
console.log('Bulb on/off: ' + util.inspect(b.name));
14+
console.log('Bulb on/off: ' + util.inspect(b));
1515
});
1616
lx.on('bulb', function(b) {
1717
console.log('New bulb found: ' + b.name);

0 commit comments

Comments
 (0)