* Battery control: add api * wip * wip * add battery discharge UI and state * Publish controllable * Reset to normal when disabling * minor * wip * wip * Revert mode on shutdown * refactored tests, renamed method in site_battery (#10859) * Fix linter * only show option if controllable; not supported message instead --------- Co-authored-by: Michael Geers <michael@geers.tv> Co-authored-by: Michael Heß <GrimmiMeloni@users.noreply.github.com>
53 lines
853 B
Go
53 lines
853 B
Go
package site
|
|
|
|
import (
|
|
"github.com/evcc-io/evcc/api"
|
|
"github.com/evcc-io/evcc/core/loadpoint"
|
|
)
|
|
|
|
// API is the external site API
|
|
type API interface {
|
|
Healthy() bool
|
|
Loadpoints() []loadpoint.API
|
|
|
|
//
|
|
// battery
|
|
//
|
|
|
|
GetBufferSoc() float64
|
|
SetBufferSoc(float64) error
|
|
GetBufferStartSoc() float64
|
|
SetBufferStartSoc(float64) error
|
|
GetPrioritySoc() float64
|
|
SetPrioritySoc(float64) error
|
|
|
|
//
|
|
// power and energy
|
|
//
|
|
|
|
GetResidualPower() float64
|
|
SetResidualPower(float64) error
|
|
|
|
//
|
|
// vehicles
|
|
//
|
|
|
|
// GetVehicles is the list of vehicles
|
|
GetVehicles() []api.Vehicle
|
|
|
|
//
|
|
// tariffs and costs
|
|
//
|
|
|
|
// GetTariff returns the respective tariff
|
|
GetTariff(string) api.Tariff
|
|
GetSmartCostLimit() float64
|
|
SetSmartCostLimit(float64) error
|
|
|
|
//
|
|
// battery control
|
|
//
|
|
|
|
GetBatteryDischargeControl() bool
|
|
SetBatteryDischargeControl(bool) error
|
|
}
|