Commit 3b014c6
Fix climate: optimistic state for temperature/fan/swing + fix watcher timer leak
Climate setters async_set_temperature, async_set_fan_mode and
async_set_swing_mode sent the command but never wrote HA state nor armed
start_watcher(), so the next 60s coordinator poll overwrote the value with
the stale cloud shadow (target temp / fan / swing "reverting" in the UI).
Align them with async_set_hvac_mode/turn_on/turn_off.
Also fix a timer leak: start_watcher() used a repeating
async_track_time_interval whose cancel callback was never called; switch to
a one-shot async_call_later, cancel any pending watcher first, and cancel it
on entity removal.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 05ad92f commit 3b014c6
1 file changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
261 | 263 | | |
262 | 264 | | |
263 | 265 | | |
| |||
350 | 352 | | |
351 | 353 | | |
352 | 354 | | |
| 355 | + | |
| 356 | + | |
353 | 357 | | |
354 | 358 | | |
355 | 359 | | |
| |||
386 | 390 | | |
387 | 391 | | |
388 | 392 | | |
| 393 | + | |
389 | 394 | | |
390 | 395 | | |
391 | 396 | | |
| |||
414 | 419 | | |
415 | 420 | | |
416 | 421 | | |
| 422 | + | |
417 | 423 | | |
418 | 424 | | |
419 | 425 | | |
420 | 426 | | |
421 | | - | |
| 427 | + | |
| 428 | + | |
422 | 429 | | |
423 | 430 | | |
0 commit comments