Updates based om comments from @SweVictor

This commit is contained in:
faanskit 2021-05-06 07:58:06 +02:00
parent 531aa8ee3e
commit c8890b8cd7
5 changed files with 29 additions and 15 deletions

View file

@ -117,7 +117,7 @@ class PlejdDeviceCommunication extends EventEmitter {
} else if (command === COMMANDS.TRIGGER_SCENE) {
this.emit(PlejdDeviceCommunication.EVENTS.sceneTriggered, data.sceneId);
} else if (command === COMMANDS.BUTTON_CLICK) {
this.emit(PlejdDeviceCommunication.EVENTS.buttonPressed, data);
this.emit(PlejdDeviceCommunication.EVENTS.buttonPressed, data.deviceId, data.deviceInput);
} else {
logger.warn(`Unknown ble command ${command}`);
}