MHI-AC-Ctrl-ESPHome icon indicating copy to clipboard operation
MHI-AC-Ctrl-ESPHome copied to clipboard

Power Status always on on reboot

Open aferrato opened this issue 2 years ago • 4 comments

Hello, when the esp8266 is rebooted, the status of the air conditioner changes to on with the last mode used even if it is actually off.

I have tried what is written here #2, but it doesn't work.

To solve I added this code:

switch (this-> power_) {
     case 0:
         this-> mode = climate :: CLIMATE_MODE_OFF;
         this-> publish_state ();
         break;
     default:
         break;
 }

inside void cbiStatusFunction (ACStatus status, int value) override before switch (status)

aferrato avatar Aug 11 '22 06:08 aferrato

I have this too. Will give your solution a try.

Edit: Just inserted that on line 93 in mhi_ac_ctrl.h, cleaned buid env. and recompiled and this works for me too!

ervee avatar Aug 15 '22 14:08 ervee

Like this works indeed! image

sanderlv avatar Oct 06 '22 21:10 sanderlv

I've committed this workaround: https://github.com/ginkage/MHI-AC-Ctrl-ESPHome/commit/a43bc7187dba3ea520b662487ad94af0bdf9fdfb Please check if it works correctly.

ginkage avatar Oct 06 '22 22:10 ginkage

I can confirm it works, thanks!

edit: this works: I've committed this workaround: https://github.com/ginkage/MHI-AC-Ctrl-ESPHome/commit/a43bc7187dba3ea520b662487ad94af0bdf9fdfb Please check if it works correctly.

sanderlv avatar Oct 08 '22 19:10 sanderlv