Skip to content

Commit

Permalink
init python after user check
Browse files Browse the repository at this point in the history
  • Loading branch information
TA2k committed Oct 6, 2022
1 parent 7fec08e commit d76b9a3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ class Midea extends utils.Adapter {
* Is called when databases are connected and adapter received configuration.
*/
async onReady() {
this.midea_beautiful = await python("midea_beautiful");

this.setState("info.connection", false, true);
if (this.config.interval < 0.5) {
this.log.info("Set interval to minimum 0.5");
Expand All @@ -71,6 +69,7 @@ class Midea extends utils.Adapter {
return;
}

this.midea_beautiful = await python("midea_beautiful");
// Reset the connection indicator during startup
this.setState("info.connection", false, true);
this.cloud = await this.login();
Expand Down

0 comments on commit d76b9a3

Please sign in to comment.