Repository navigation
Commit a9f6940
fix: EV_FREE priority now allows solar surplus charging when charger is OFF (v0.9.9)
Fixed critical bug where Priority Balancer's EV_FREE mode prevented charger from
starting when it was OFF, even with abundant solar surplus available.
PROBLEM:
- Fresh v0.9.8 installations with Priority Balancer enabled and targets already met
- Charger was OFF, priority was EV_FREE, 6000W solar surplus available
- Charger never started because EV_FREE logic returned early after checking charger state
- Solar surplus logic never executed, wasting available solar energy
ROOT CAUSE:
In solar_surplus.py lines 479-496, the EV_FREE priority check:
1. Stopped charger if it was ON (correct)
2. Returned early in ALL cases (incorrect)
3. Never allowed fall-through to solar surplus calculation when charger was OFF
FIX:
Modified solar_surplus.py EV_FREE priority logic:
- If charger is ON: stop it and return early (prevents unnecessary charging)
- If charger is OFF: log informational message and fall through to solar surplus logic
- Solar surplus logic can now start charger if sufficient excess solar available
IMPACT:
- Maximizes solar energy utilization by charging EV with excess solar even after daily targets met
- Fresh installations now work correctly: charger starts automatically with solar surplus
- Resolves user-reported issue where 6000W solar surplus was ignored in EV_FREE mode
- Users with Priority Balancer enabled will see improved solar energy usage
Files Changed:
- custom_components/ev_smart_charger/solar_surplus.py (lines 479-503)
- custom_components/ev_smart_charger/manifest.json (version 0.9.8 → 0.9.9)
- README.md (version + changelog)
Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent e34a498 commit a9f6940
3 files changed
Lines changed: 33 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
729 | 729 | | |
730 | 730 | | |
731 | 731 | | |
732 | | - | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
733 | 756 | | |
734 | 757 | | |
735 | 758 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
| 480 | + | |
480 | 481 | | |
481 | 482 | | |
482 | 483 | | |
| |||
494 | 495 | | |
495 | 496 | | |
496 | 497 | | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
497 | 504 | | |
498 | 505 | | |
499 | 506 | | |
| |||
0 commit comments