Skip to content

Commit

Permalink
Revert "Innogy: add api.MeterEnergy"
Browse files Browse the repository at this point in the history
This reverts commit da4af01.
  • Loading branch information
andig committed May 6, 2024
1 parent 45e3df9 commit 7d67b50
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions charger/innogy.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const (
igyRegManufacturer = 100 // Input
igyRegFirmware = 200 // Input
igyRegStatus = 275 // Input
igyRegEnergy = 307 // Input
igyRegCurrents = 1006 // current readings per phase
)

Expand Down Expand Up @@ -164,18 +163,6 @@ func (wb *Innogy) CurrentPower() (float64, error) {
return 230 * (l1 + l2 + l3), err
}

var _ api.MeterEnergy = (*Innogy)(nil)

// TotalEnergy implements the api.MeterEnergy interface
func (wb *Innogy) TotalEnergy() (float64, error) {
b, err := wb.conn.ReadInputRegisters(igyRegEnergy, 2)
if err != nil {
return 0, err
}

return float64(math.Float32frombits(binary.BigEndian.Uint32(b))), nil
}

var _ api.PhaseCurrents = (*Innogy)(nil)

// Currents implements the api.PhaseCurrents interface
Expand Down

0 comments on commit 7d67b50

Please sign in to comment.