Repository navigation
Commit 6e620b2
test(inverter): cover FoxCloud in the idle-cycle button press regression
test_force_export_off_does_not_press_every_cycle named the FoxCloud/TESLA/
Enphase/Deye/Sunsynk/AlphaESS cloud types in its docstring as the affected
set but only parametrised GS_fb00 and GS, so the cloud behaviour rested on
GS_fb00 happening to share has_discharge_enable_time rather than on a test.
FoxCloud stands in for those types, and its expected press count is 0 rather
than 1: being HH:MM:SS format it never takes the H M unconditional register
rewrite, so the commit-once safety net gated on that format is skipped too
and an idle cloud inverter should be silent, not spend one press on a first
post-restart commit the way GS_fb00 does.
Also adds a positive control - entering an export window straight after the
idle cycles must still commit exactly once. Without it an inverter that had
stopped pressing altogether would satisfy the idle assertion just as well,
which is the failure mode that would actually matter to a Fox user.
inv.sleep is stubbed for the loop: TestHAInterface applies a service call
synchronously, so the write-and-poll read-back already sees the new value
and the sleep between them is pure wall clock. discharge_target_soc and the
idle time selects join saved_items, as the positive control writes them and
this test shares my_predbat/ha with the rest of the run.
Verified against two mutations of inverter.py, each reverted after: restoring
the pre-fix None comparison (times_supplied = True) makes FoxCloud press on
all 4 idle cycles, and disabling the press block trips the positive control.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent dabd591 commit 6e620b2
1 file changed
Lines changed: 29 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2588 | 2588 | | |
2589 | 2589 | | |
2590 | 2590 | | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
2591 | 2598 | | |
2592 | 2599 | | |
2593 | 2600 | | |
| |||
2601 | 2608 | | |
2602 | 2609 | | |
2603 | 2610 | | |
2604 | | - | |
| 2611 | + | |
| 2612 | + | |
| 2613 | + | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
| 2618 | + | |
2605 | 2619 | | |
2606 | 2620 | | |
2607 | | - | |
| 2621 | + | |
2608 | 2622 | | |
2609 | 2623 | | |
2610 | 2624 | | |
| 2625 | + | |
| 2626 | + | |
| 2627 | + | |
| 2628 | + | |
2611 | 2629 | | |
2612 | 2630 | | |
2613 | 2631 | | |
| |||
2628 | 2646 | | |
2629 | 2647 | | |
2630 | 2648 | | |
| 2649 | + | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
| 2656 | + | |
| 2657 | + | |
2631 | 2658 | | |
2632 | 2659 | | |
2633 | 2660 | | |
| |||
0 commit comments