geoffdavis / esphome-mitsubishiheatpump

ESPHome Climate Component for Mitsubishi Heatpumps using direct serial connection
BSD 2-Clause "Simplified" License
560 stars 153 forks source link

Fix status display issues #36

Closed bulletmark closed 3 years ago

bulletmark commented 3 years ago
  1. A user control should never masquerade the status that is being returned by the heatpump, e.g sometimes the heatpump ignores the control so an incorrect state is displayed. To fix this, all instances where "action" is set in the control() function are removed.

  2. There were 3 places in the hpSettingsChanged() function where I believe somebody typed the wrong action fields. CLIMATE_ACTION_IDLE was being set for HEAT, COOL, and AUTO instead of their corresponding actual actions.

  3. Fixed an "updated" flag that was in the wrong place in control().

bulletmark commented 3 years ago

I have pushed this PR not expecting it to be merged as is. The point of it is to show the type of fixes I mean for issue #35. I find the logic changes here work much better than how it was but I am hoping we can discuss it here and/or in that issue.

bulletmark commented 3 years ago

Note, in issue #35 I describe 2 problems. This PR does not really fix the first problem but it does fix the second problem.

bulletmark commented 3 years ago

I'd like to delete this PR as I am not sure it improves things.