nebulous / infinitude

Open control of Carrier/Bryant thermostats
MIT License
224 stars 50 forks source link

Fix hold activity incorrectly snapping back to "home" #142

Closed mamarley closed 2 years ago

mamarley commented 2 years ago

-Switch from ng-init on the dropdown to ng-change on the hold checkbox for the default hold activity assignment, which executes only when the user changes toggles the checkbox.

-Define a new "equals()" wrapper around "angular.equals()" in the main controller and use it for the zone hold activity comparison, since angular.equals() itself is not defined in the scope used by the ng-change directive evaluation.

This fixes https://github.com/nebulous/infinitude/issues/141. I thought I had tested this stuff after I originally implemented it, but I guess I must be going crazy.

nebulous commented 2 years ago

I let too much of my experimental branch leak into the serial processing as well. We all take crazypills sometimes. This merge will likely be followed by a backend merge in a bit. 💊 💊