Closed bulletmark closed 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.
Note, in issue #35 I describe 2 problems. This PR does not really fix the first problem but it does fix the second problem.
I'd like to delete this PR as I am not sure it improves things.
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.
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.
Fixed an "updated" flag that was in the wrong place in control().