Skip to content

Commit

Permalink
Loadpoint: fix 1p3p charger not updating physical state if phase conf…
Browse files Browse the repository at this point in the history
…ig not set to auto (#18637)
  • Loading branch information
andig authored Feb 6, 2025
1 parent 09e47b0 commit dd2af01
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/loadpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,10 @@ func (lp *Loadpoint) restoreSettings() {
}
if v, err := lp.settings.Int(keys.Phases); err == nil && (v > 0 || lp.hasPhaseSwitching()) {
lp.setConfiguredPhases(int(v))
lp.phases = lp.configuredPhases
// for 1p3p charger, we don't know the physical state yet (phases == 0), so don't touch it
if !lp.hasPhaseSwitching() {
lp.phases = lp.configuredPhases
}
}
if v, err := lp.settings.Float(keys.MinCurrent); err == nil && v > 0 {
lp.setMinCurrent(v)
Expand Down

0 comments on commit dd2af01

Please sign in to comment.