HardyBarth: add phase voltages (#30490)

This commit is contained in:
premultiply 2026-06-04 13:32:49 +02:00 • committed by GitHub
parent 3119fc61b3
commit 0c4ce3f422
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -233,6 +233,18 @@ func (wb *HardyBarth) Currents() (float64, float64, float64, error) {
return res.Data[obis.CurrentDemandL1], res.Data[obis.CurrentDemandL2], res.Data[obis.CurrentDemandL3], nil
}
var _ api.PhaseVoltages = (*HardyBarth)(nil)
// Voltages implements the api.PhaseVoltages interface
func (wb *HardyBarth) Voltages() (float64, float64, float64, error) {
res, err := wb.meterG()
if err != nil {
return 0, 0, 0, err
}
return res.Data[obis.VoltageDemandL1], res.Data[obis.VoltageDemandL2], res.Data[obis.VoltageDemandL3], nil
}
// var _ api.Identifier = (*HardyBarth)(nil)
// // Identify implements the api.Identifier interface