Merge branch 'bluez' of https://github.com/icanos/hassio-plejd into bluez

This commit is contained in:
Marcus Westin 2020-01-24 11:00:32 +01:00
commit 1deb59ce6b
6 changed files with 58 additions and 9 deletions

View file

@ -15,7 +15,6 @@ async function main() {
const client = new mqtt.MqttClient(config.mqttBroker, config.mqttUsername, config.mqttPassword);
plejdApi.once('loggedIn', () => {
plejdApi.getCryptoKey();
plejdApi.on('ready', (cryptoKey) => {
const devices = plejdApi.getDevices();
@ -72,6 +71,8 @@ async function main() {
}
});
});
plejdApi.getCryptoKey();
});
plejdApi.login();