From 72cb1e38005a1f7285722bd54f09f315d6ca62f4 Mon Sep 17 00:00:00 2001 From: andig Date: Thu, 8 Feb 2024 19:14:13 +0100 Subject: [PATCH] Add PhaseDescriber api (#12052) --- api/api.go | 7 ++++++- assets/js/components/Loadpoint.vue | 3 ++- .../js/components/LoadpointSettingsModal.vue | 19 +++++++++++++------ charger/switchsocket.go | 7 +++++++ core/keys/loadpoint.go | 7 ++++--- core/loadpoint.go | 8 +++++++- core/loadpoint_phases.go | 14 ++++++++++++-- 7 files changed, 51 insertions(+), 14 deletions(-) diff --git a/api/api.go b/api/api.go index 85ff24b5b9..37f907e031 100644 --- a/api/api.go +++ b/api/api.go @@ -107,15 +107,20 @@ type Authorizer interface { Authorize(key string) error } +// PhaseDescriber returns the number of availablephases +type PhaseDescriber interface { + Phases() int +} + // Vehicle represents the EV and it's battery type Vehicle interface { Battery BatteryCapacity IconDescriber FeatureDescriber + PhaseDescriber Title() string SetTitle(string) - Phases() int Identifiers() []string OnIdentified() ActionConfig } diff --git a/assets/js/components/Loadpoint.vue b/assets/js/components/Loadpoint.vue index 5925dddb00..b601113ebc 100644 --- a/assets/js/components/Loadpoint.vue +++ b/assets/js/components/Loadpoint.vue @@ -170,7 +170,8 @@ export default { phases: Number, phasesConfigured: Number, phasesActive: Number, - phases1p3p: Boolean, + chargerPhases1p3p: Boolean, + chargerPhysicalPhases: Number, minCurrent: Number, maxCurrent: Number, chargeCurrent: Number, diff --git a/assets/js/components/LoadpointSettingsModal.vue b/assets/js/components/LoadpointSettingsModal.vue index 6885333050..f73eec78e5 100644 --- a/assets/js/components/LoadpointSettingsModal.vue +++ b/assets/js/components/LoadpointSettingsModal.vue @@ -26,7 +26,7 @@

{{ $t("main.loadpointSettings.currents") }}

-
+