From 38e86fe73dfd3b639f62f78eba5494e740e38086 Mon Sep 17 00:00:00 2001 From: Marcel Goerentz <57457529+marcelGoerentz@users.noreply.github.com> Date: Tue, 16 Dec 2025 08:33:46 +0100 Subject: [PATCH] Vehicles: add maximum power, improves planner (#25303) Signed-off-by: Marcel Goerentz Co-authored-by: Michael Geers --- api/actionconfig.go | 5 ++++ assets/js/components/Config/VehicleModal.vue | 25 +++++++++++++++++++- core/loadpoint_effective.go | 5 ++++ core/site_vehicles.go | 2 ++ i18n/de.json | 2 ++ i18n/en.json | 2 ++ util/templates/defaults.yaml | 13 ++++++++++ util/templates/includes/vehicle-common.tpl | 5 +++- 8 files changed, 57 insertions(+), 2 deletions(-) diff --git a/api/actionconfig.go b/api/actionconfig.go index f48742ce7..654908de4 100644 --- a/api/actionconfig.go +++ b/api/actionconfig.go @@ -13,6 +13,7 @@ type ActionConfig struct { Priority int `mapstructure:"priority,omitempty"` // Priority MinCurrent float64 `mapstructure:"minCurrent,omitempty"` // Minimum Current MaxCurrent float64 `mapstructure:"maxCurrent,omitempty"` // Maximum Current + MaxPower float64 `mapstructure:"maxPower,omitempty"` // Maximum Charging Power } // String implements Stringer and returns the ActionConfig as comma-separated key:value string @@ -38,6 +39,10 @@ func (a ActionConfig) GetMaxCurrent() (float64, bool) { return a.MaxCurrent, a.MaxCurrent > 0 } +func (a ActionConfig) GetMaxPower() (float64, bool) { + return a.MaxPower, a.MaxPower > 0 +} + func (a ActionConfig) GetPriority() (int, bool) { return a.Priority, a.Priority > 0 } diff --git a/assets/js/components/Config/VehicleModal.vue b/assets/js/components/Config/VehicleModal.vue index 6336317fe..3e9af7905 100644 --- a/assets/js/components/Config/VehicleModal.vue +++ b/assets/js/components/Config/VehicleModal.vue @@ -97,6 +97,21 @@ + + + +