Warn when other phases than L1 are active (#2719)

This commit is contained in:
andig 2022-02-28 09:43:18 +01:00 • committed by GitHub
parent f0dc811224
commit 3f422c88eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1327,8 +1327,11 @@ func (lp *LoadPoint) updateChargeCurrents() {
if lp.charging() {
var phases int
for _, i := range lp.chargeCurrents {
for l, i := range lp.chargeCurrents {
if i >= minActiveCurrent {
if l > 0 && phases == 0 {
lp.log.WARN.Printf("invalid wiring: phase %d observed active should be first phase", l+1)
}
phases++
}
}