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
|
||||
wemoClient.on('binaryState', function(value) {
|
||||
logger.debug('Binary State changed to: %s', value);
|
||||
// busEmitter.emit('updateState', value);
|
||||
});
|
||||
|
||||
// Turn the switch on
|
||||
@ -56,8 +55,8 @@ busEmitter.on('changeState', function(mode) {
|
||||
|
||||
if (wemoClient !== null) {
|
||||
wemoClient.setBinaryState(mode);
|
||||
// let newState = wemoClient.getBinaryState();
|
||||
// busEmitter.emit('updateState', newState);
|
||||
let newState = wemoClient.getBinaryState();
|
||||
busEmitter.emit('updateState', newState);
|
||||
} else {
|
||||
console.error('No wemoClient');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user