TWC3: return VA power only if status C (#6712)

Fixes #6677
This commit is contained in:
premultiply 2023-03-09 12:03:56 +01:00 • committed by GitHub
parent 1f4b7ab47d
commit 36bd8cc176
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -174,7 +174,10 @@ var _ api.Meter = (*Twc3)(nil)
// CurrentPower implements the api.Meter interface
func (v *Twc3) CurrentPower() (float64, error) {
res, err := v.vitalsG()
return (res.CurrentAA + res.CurrentBA + res.CurrentCA) * res.GridV, err
if res.ContactorClosed {
return (res.CurrentAA + res.CurrentBA + res.CurrentCA) * res.GridV, err
}
return 0, err
}
var _ api.PhaseVoltages = (*Twc3)(nil)