some changes to global mode

This commit is contained in:
Martin Donnelly 2017-02-28 22:44:55 +00:00
parent 815a68e948
commit e48bf30f68

View File

@ -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');
}