Commit d0d18f2
committed
fix: Disabled schedule not being persisted
* Fixed issue when disabled schedule reverts back to enabled upon
reboot. That is due to `winter_mode` switch restores to OFF
(apparently, when winter mode is disabled) triggering its
`turn_off_action`, which turns off both controls to disable lawn and
flowerbed sprinklers. The issue manifests itself only when winter mode
is disabled.
The fix is to introduce the internal switches (for each of
user-visible controls disabling each of schedules), those aggregate
state of winter mode and the corresponding user-visible switch.
The intermediate entity is then controlled by `winter_mode` switch,
and prevents that affecting the state of the schedule might have been
set by the user.1 parent 0f6158c commit d0d18f2
2 files changed
+24
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
233 | | - | |
| 232 | + | |
| 233 | + | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
243 | | - | |
244 | | - | |
245 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
69 | 77 | | |
70 | 78 | | |
71 | 79 | | |
72 | 80 | | |
73 | | - | |
| 81 | + | |
| 82 | + | |
74 | 83 | | |
75 | 84 | | |
76 | 85 | | |
| |||
129 | 138 | | |
130 | 139 | | |
131 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
132 | 147 | | |
133 | 148 | | |
134 | 149 | | |
135 | 150 | | |
136 | | - | |
| 151 | + | |
137 | 152 | | |
138 | 153 | | |
139 | 154 | | |
| |||
203 | 218 | | |
204 | 219 | | |
205 | 220 | | |
206 | | - | |
| 221 | + | |
207 | 222 | | |
208 | 223 | | |
209 | 224 | | |
| |||
229 | 244 | | |
230 | 245 | | |
231 | 246 | | |
232 | | - | |
| 247 | + | |
233 | 248 | | |
234 | 249 | | |
235 | 250 | | |
| |||
0 commit comments