Open TerminatorNL opened 4 months ago
Thank you for the contribution! Please do file a PR! That way, either me or (more likely) @RobertJansen1 will be able to review and/or suggest changes to the code while preserving the attribution (read: give credit where it's due). The code style is less of an issue, I don't really mind, as long as it is a meaningful, useful and working change.
Thanks for the lovely reply! My free time is currently limited, but I'll pick this up in the future if someone else hasn't already.
Hi Ginkage,
Thank you so much for your hard work making this ESPHome variant of the MHI AC Ctrl. I've combined your code with the latest version of https://github.com/absalom-muc/MHI-AC-Ctrl/commit/c6592d329839938ddec8d4a2d23316fb0b5c12a7.
The approach in my fork https://github.com/ginkage/MHI-AC-Ctrl-ESPHome/compare/master...TerminatorNL:MHI-AC-Ctrl-ESPHome-TempRange:master allows reading the internal temperature sensor and feeds that value back into the AC unit as external room temperature. I've had this running for a week now, and experienced no issues.
I decided to not make a PR because my code style might not line up with yours as I'm relatively new to C++ and ESPHome programming. But you are more than welcome to take inspiration (read: copy) from my approach and spread the love.
Here's some of my findings:
You can see the most important change here: https://github.com/TerminatorNL/MHI-AC-Ctrl-ESPHome-TempRange/blob/f5e0fb8a48fd069097ba1d6a01fcc0edbbac20ac/mhi_ac_ctrl.h#L145-L194
The internal temperature sensor actually updates quite quickly. I'm quite confident we could do away with an external temperature sensor all together if we just add one additional offset as a calibration parameter, but that was out of scope for me for now.
I hope this helps you and others.