Loadpoint: detect connection changes using connected duration (#24730)
This commit is contained in:
parent
d818bf1467
commit
c023b080d6
6 changed files with 201 additions and 50 deletions
|
|
@ -7,7 +7,7 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
//go:generate go tool mockgen -package api -destination mock.go github.com/evcc-io/evcc/api Charger,ChargeState,CurrentLimiter,CurrentGetter,PhaseSwitcher,PhaseGetter,FeatureDescriber,Identifier,Meter,MeterEnergy,PhaseCurrents,Vehicle,ChargeRater,Battery,BatteryController,BatterySocLimiter,Circuit,Tariff
|
||||
//go:generate go tool mockgen -package api -destination mock.go github.com/evcc-io/evcc/api Charger,ChargeState,CurrentLimiter,CurrentGetter,PhaseSwitcher,PhaseGetter,FeatureDescriber,Identifier,Meter,MeterEnergy,PhaseCurrents,Vehicle,ConnectionTimer,ChargeRater,Battery,BatteryController,BatterySocLimiter,Circuit,Tariff
|
||||
|
||||
// Meter provides total active power in W
|
||||
type Meter interface {
|
||||
|
|
@ -115,6 +115,11 @@ type ChargeTimer interface {
|
|||
ChargeDuration() (time.Duration, error)
|
||||
}
|
||||
|
||||
// ConnectionTimer provides current connection duration
|
||||
type ConnectionTimer interface {
|
||||
ConnectionDuration() (time.Duration, error)
|
||||
}
|
||||
|
||||
// ChargeRater provides charged energy amount in kWh
|
||||
type ChargeRater interface {
|
||||
ChargedEnergy() (float64, error)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue