Restore logic for chargers that disable themselves to be able to switch phases (#12847)

This commit is contained in:
MarkusGH 2024-03-11 14:22:03 +01:00 • committed by GitHub
parent e6f0d61c5b
commit f8a10aecd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -658,6 +658,11 @@ func (lp *Loadpoint) syncCharger() error {
return err
}
// some chargers (i.E. Easee in some configurations) disable themself to be able to switch phases
if !enabled && lp.enabled && !lp.phaseSwitchCompleted() {
return lp.charger.Enable(true) // enable charger
}
if lp.chargerUpdateCompleted() {
defer func() {
lp.enabled = enabled