added support to toggle logging through mqtt
This commit is contained in:
parent
a9567517ef
commit
c8dae032a9
4 changed files with 57 additions and 11 deletions
|
|
@ -45,6 +45,18 @@ async function main() {
|
|||
plejd.turnOff(deviceId, command);
|
||||
}
|
||||
});
|
||||
|
||||
client.on('settingsChanged', (settings) => {
|
||||
if (settings.module === 'mqtt') {
|
||||
client.updateSettings(settings);
|
||||
}
|
||||
else if (settings.module === 'ble') {
|
||||
plejd.updateSettings(settings);
|
||||
}
|
||||
else if (settings.module === 'api') {
|
||||
plejdApi.updateSettings(settings);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue