Skip to content

Commit

Permalink
Clarify phase setting for non 1p3p chargers (evcc-io#12017)
Browse files Browse the repository at this point in the history
  • Loading branch information
naltatis authored Feb 2, 2024
1 parent 4c84322 commit 6e087cd
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
33 changes: 23 additions & 10 deletions assets/js/components/LoadpointSettingsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@
{{ $t("main.loadpointSettings.phasesConfigured.label") }}
</label>
<div class="col-sm-8 pe-0">
<p v-if="!phases1p3p" class="mt-0 mb-2">
<small>
{{
$t(
"main.loadpointSettings.phasesConfigured.no1p3pSupport"
)
}}</small
>
</p>
<div
v-for="phases in phasesOptions"
:key="phases"
Expand Down Expand Up @@ -179,20 +188,24 @@ export default {
return [PHASES_3, PHASES_1];
},
maxPower: function () {
if (this.phasesConfigured === PHASES_AUTO) {
return this.maxPowerPhases(3);
}
if ([PHASES_3, PHASES_1].includes(this.phasesConfigured)) {
return this.maxPowerPhases(this.phasesConfigured);
if (this.phases1p3p) {
if (this.phasesConfigured === PHASES_AUTO) {
return this.maxPowerPhases(3);
}
if ([PHASES_3, PHASES_1].includes(this.phasesConfigured)) {
return this.maxPowerPhases(this.phasesConfigured);
}
}
return this.fmtKw(this.maxCurrent * V * this.phasesActive);
},
minPower: function () {
if (this.phasesConfigured === PHASES_AUTO) {
return this.minPowerPhases(1);
}
if ([PHASES_3, PHASES_1].includes(this.phasesConfigured)) {
return this.minPowerPhases(this.phasesConfigured);
if (this.phases1p3p) {
if (this.phasesConfigured === PHASES_AUTO) {
return this.minPowerPhases(1);
}
if ([PHASES_3, PHASES_1].includes(this.phasesConfigured)) {
return this.minPowerPhases(this.phasesConfigured);
}
}
return this.fmtKw(this.minCurrent * V * this.phasesActive);
},
Expand Down
1 change: 1 addition & 0 deletions i18n/de.toml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ label = "Min. Ladung %"

[main.loadpointSettings.phasesConfigured]
label = "Phasen"
no1p3pSupport = "Wie ist deine Wallbox angeschlossen?"
phases_0 = "automatischer Wechsel"
phases_1 = "1-phasig"
phases_1_hint = "({min} bis {max})"
Expand Down
1 change: 1 addition & 0 deletions i18n/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ label = "Min. charge %"

[main.loadpointSettings.phasesConfigured]
label = "Phases"
no1p3pSupport = "How is your charger connected?"
phases_0 = "auto-switching"
phases_1 = "1 phase"
phases_1_hint = "({min} to {max})"
Expand Down

0 comments on commit 6e087cd

Please sign in to comment.