Commit a560117
authored
Fix AC charger switch state by using numeric system state values (#284)
The AC charger system state is stored internally as a numeric enum value, not a mapped string.
The previous switch logic compared the state against string values
("Initializing", "Fault", etc.), which caused the switch to never
correctly reflect the charger state.
This change updates is_on_fn to rely on the numeric system state values reported by the charger. Currently treating states 3, 4, and 5 as ON.
This aligns the AC charger switch behavior with how other switches
(e.g. plant_start_stop) determine their state.1 parent 8104cd6 commit a560117
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
0 commit comments