mikakoivisto / controlmyspa-ha-mqtt

GNU General Public License v3.0
11 stars 4 forks source link

Pre mature conclusion of failure #15

Open willem7684 opened 5 months ago

willem7684 commented 5 months ago

First of, I am really pleased with this addon! It is simple and I like simple 😃

~/lib/controlmyspajs/controlmyspa.js

Statements containing: await this.sleep(5000);

Are causing premature errors. It states that the requested function (any of them) is failed but 2 seconds later is it resolved and correctly updated. May this be doubled? That way I will not have my wife nagging day in day out that HA is being funky 😄

mikakoivisto commented 5 months ago

That is the ControlMySpa.js library from https://gitlab.com/VVlasy/controlmyspajs which I recently had to fork to fix issue with changed API. I'm not a fan of await especially without proper error handling which that library has zero. Those sleeps are there probably to wait for the spa to actually react to the command. At some point when I have I will have to rewrite the whole thing if I'm going to maintain it myself. I think the original author has abandoned it.