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 @@ + + + +