some changes to global mode
This commit is contained in:
parent
815a68e948
commit
e48bf30f68
@ -44,7 +44,6 @@ wemo.discover(function(deviceInfo) {
|
|||||||
// Handle BinaryState events
|
// Handle BinaryState events
|
||||||
wemoClient.on('binaryState', function(value) {
|
wemoClient.on('binaryState', function(value) {
|
||||||
logger.debug('Binary State changed to: %s', value);
|
logger.debug('Binary State changed to: %s', value);
|
||||||
// busEmitter.emit('updateState', value);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Turn the switch on
|
// Turn the switch on
|
||||||
@ -56,8 +55,8 @@ busEmitter.on('changeState', function(mode) {
|
|||||||
|
|
||||||
if (wemoClient !== null) {
|
if (wemoClient !== null) {
|
||||||
wemoClient.setBinaryState(mode);
|
wemoClient.setBinaryState(mode);
|
||||||
// let newState = wemoClient.getBinaryState();
|
let newState = wemoClient.getBinaryState();
|
||||||
// busEmitter.emit('updateState', newState);
|
busEmitter.emit('updateState', newState);
|
||||||
} else {
|
} else {
|
||||||
console.error('No wemoClient');
|
console.error('No wemoClient');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user