Shelly: use TotalIn for sml totalenergy (#20826)

This commit is contained in:
Markus Thierolf 2025-04-24 09:53:17 +02:00 • committed by GitHub
parent 0260c63cf4
commit c96df5ac25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -214,7 +214,7 @@ func (c *Connection) CurrentPower() (float64, error) {
// TotalEnergy implements the api.MeterEnergy interface
func (c *Connection) TotalEnergy() (float64, error) {
res, err := c.statusSnsG.Get()
return res.StatusSNS.Energy.Total + res.StatusSNS.SML.TotalOut, err
return res.StatusSNS.Energy.Total + res.StatusSNS.SML.TotalIn, err
}
// Currents implements the api.PhaseCurrents interface