added scene event to mqtt

This commit is contained in:
icanos 2019-12-22 17:48:16 +00:00
parent ec624c6773
commit 3aa69d0930
2 changed files with 12 additions and 2 deletions

View file

@ -32,6 +32,10 @@ async function main() {
client.updateState(deviceId, command);
});
plejd.on('sceneTriggered', (scene) => {
client.sceneTriggered(scene);
});
// subscribe to changes from HA
client.on('stateChanged', (deviceId, command) => {
if (command.state === 'ON') {