Updates based om comments from @SweVictor
This commit is contained in:
parent
531aa8ee3e
commit
c8890b8cd7
5 changed files with 29 additions and 15 deletions
|
|
@ -126,13 +126,16 @@ class PlejdAddon extends EventEmitter {
|
|||
},
|
||||
);
|
||||
|
||||
this.plejdDeviceCommunication.on(PlejdDeviceCommunication.EVENTS.buttonPressed, (data) => {
|
||||
try {
|
||||
this.mqttClient.buttonPressed(data);
|
||||
} catch (err) {
|
||||
logger.error('Error in PlejdService.sceneTriggered callback', err);
|
||||
}
|
||||
});
|
||||
this.plejdDeviceCommunication.on(
|
||||
PlejdDeviceCommunication.EVENTS.buttonPressed,
|
||||
(deviceId, deviceInput) => {
|
||||
try {
|
||||
this.mqttClient.buttonPressed(deviceId, deviceInput);
|
||||
} catch (err) {
|
||||
logger.error('Error in PlejdService.buttonPressed callback', err);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
this.plejdDeviceCommunication.on(PlejdDeviceCommunication.EVENTS.sceneTriggered, (sceneId) => {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue