Repository navigation
Commit 894edf7
committed
fix: show working-mode label instead of raw state number
The inverter section showed a bare state number (e.g. "20") that meant
nothing. The frontend had a stale hardcoded STATE_MAP that didn't even match
the real LuxPower/EG4 working-mode codes.
- Remove the wrong hardcoded STATE_MAP (mapped 0:Standby, 1:Self-test, etc.
— completely different from the actual protocol).
- Use the API's state_label (already computed via _state_label from the
protocol doc) in both the summary card and the detail view.
- state_label shows the meaning plus the raw code for reference, e.g.
"PV + battery on-grid (20)".1 parent 732bae7 commit 894edf7
1 file changed
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
518 | | - | |
519 | | - | |
520 | 518 | | |
521 | 519 | | |
522 | 520 | | |
523 | 521 | | |
524 | 522 | | |
525 | | - | |
| 523 | + | |
| 524 | + | |
526 | 525 | | |
527 | 526 | | |
528 | 527 | | |
| |||
631 | 630 | | |
632 | 631 | | |
633 | 632 | | |
634 | | - | |
| 633 | + | |
635 | 634 | | |
636 | 635 | | |
637 | 636 | | |
| |||
0 commit comments