SMA: remove remote control (BC) (#23906)

This commit is contained in:
andig 2025-10-03 16:51:12 +02:00 • committed by GitHub
parent 16f4681429
commit 148aa76b67
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 35 additions and 254 deletions

View file

@ -32,32 +32,6 @@ type PlanPreviewResponse struct {
Power float64 `json:"power"`
}
// remoteDemandHandler updates minimum soc
func remoteDemandHandler(lp loadpoint.API) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
vars := mux.Vars(r)
source := vars["source"]
demand, err := loadpoint.RemoteDemandString(vars["demand"])
if err != nil {
jsonError(w, http.StatusBadRequest, err)
return
}
lp.RemoteControl(source, demand)
res := struct {
Demand loadpoint.RemoteDemand `json:"demand"`
Source string `json:"source"`
}{
Source: source,
Demand: demand,
}
jsonWrite(w, res)
}
}
// planHandler returns the current plan
func planHandler(lp loadpoint.API) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {