Commit 7618348
committed
feat: add support for directional power flow for individual objects
Integrated commit c00dd74 from hobbymachinist/power-flow-card-plus (PR flixlix#873):
**Changes:**
- Modified `getIndividualState()` to return signed values (removed Math.abs)
- Added `absState` calculation in `getIndividualObject()` to handle negative states
- State values now retain directionality while display shows absolute values
- Enables proper animation inversion for bidirectional devices (V2H/V2G)
**Impact:**
- Individual objects can now properly display power flow direction
- Supports Vehicle-to-Home (V2H) and Vehicle-to-Grid (V2G) scenarios
- Animation correctly inverts when power flow reverses
**Note on commit 2342177 from dpayk/power-flow-card-plus:**
This commit fixes battery charging flow calculation, but a more comprehensive
solution was already applied via PR flixlix#878 which handles grid export and uses
more robust Math.max/Math.min logic.
Build verified successful.1 parent ee182a7 commit 7618348
2 files changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | | - | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
0 commit comments