Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,19 @@
>
<i-row>
<i-column>
<font-awesome-icon
fixed-width
:icon="mode.symbol.icon"
:rotation="mode.symbol.rotation"
/>
<template
v-for="(symbol, index) in mode.symbols"
:key="index"
>
<font-awesome-icon
fixed-width
:icon="symbol.icon"
:rotation="symbol.rotation"
/>
<span v-if="index < mode.symbols.length - 1">
/
</span>
</template>
</i-column>
<i-column>
{{ mode.label }}
Expand All @@ -53,10 +61,11 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import {
faBatteryFull as fasBatteryFull,
faBatteryHalf as fasBatteryHalf,
faCar as fasCar
faCar as fasCar,
faPlug as fasPlug
} from "@fortawesome/free-solid-svg-icons";
/* add icons to the library */
library.add(fasBatteryFull, fasBatteryHalf, fasCar);
library.add(fasBatteryFull, fasBatteryHalf, fasCar, fasPlug);

export default {
name: "BatteryModeModal",
Expand All @@ -71,27 +80,30 @@ export default {
batteryModes: [
{
value: 'ev_mode',
label: 'Fahrzeuge',
label: 'Fzg./Verbr.',
color: 'primary',
symbol: { icon: ['fas', 'fa-car'], rotation: 0 },
symbols: [
{ icon: ['fas', 'car'], rotation: 0 },
{ icon: ['fas', 'plug'], rotation: 0 }
],
},
{
value: 'bat_mode',
label: 'Speicher',
color: 'primary',
symbol: {
symbols: [{
icon: ['fas', 'battery-full'],
rotation: 270,
},
}],
},
{
value: 'min_soc_bat_mode',
label: 'Mindest-SoC',
color: 'primary',
symbol: {
symbols: [{
icon: ['fas', 'battery-half'],
rotation: 270,
},
}],
},
]
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,19 +301,33 @@ export default {
chargePoint3Discharging() {
return this.chargePoint3Power.value < 0;
},
batteryModeIcon() {
batteryModeIcons() {
const mode = this.mqttStore.getBatteryMode;
switch (mode) {
case "ev_mode":
return VehicleIcon;
return [VehicleIcon, ConsumerIcon];
case "bat_mode":
return BatteryIcon;
return [BatteryIcon];
case "min_soc_bat_mode":
return Battery40Icon;
return [Battery40Icon];
default:
return "---";
}
},
batteryModeIconSize() {
return this.svgSize.circleRadius * (this.batteryModeIcons.length > 1 ? 0.45 : 0.6);
},
batteryModeIconSeparatorWidth() {
return this.svgSize.circleRadius * 0.15;
},
batteryModeIconStartX() {
const buttonX = this.svgSize.circleRadius * 1.2;
const buttonWidth = this.svgSize.circleRadius * 1.1;
const groupWidth =
this.batteryModeIcons.length * this.batteryModeIconSize +
(this.batteryModeIcons.length - 1) * this.batteryModeIconSeparatorWidth;
return buttonX + (buttonWidth - groupWidth) / 2;
},
svgComponents() {
var components = [];
// add grid component
Expand Down Expand Up @@ -944,14 +958,29 @@ export default {
opacity="1"
filter="url(#f-shadow)"
/>
<component
:is="batteryModeIcon"
:x="svgSize.circleRadius * 1.45"
:y="-svgSize.circleRadius * 1.35"
:height="svgSize.circleRadius * 0.6"
:width="svgSize.circleRadius * 0.6"
:style="{ color: 'var(--color--warning)' }"
/>
<template
v-for="(icon, index) in batteryModeIcons"
:key="index"
>
<component
:is="icon"
:x="batteryModeIconStartX + index * (batteryModeIconSize + batteryModeIconSeparatorWidth)"
:y="-svgSize.circleRadius * 1.4 + (svgSize.circleRadius * 0.7 - batteryModeIconSize) / 2"
:height="batteryModeIconSize"
:width="batteryModeIconSize"
:style="{ color: 'var(--color--warning)' }"
/>
<text
v-if="index < batteryModeIcons.length - 1"
:x="batteryModeIconStartX + index * (batteryModeIconSize + batteryModeIconSeparatorWidth) + batteryModeIconSize + batteryModeIconSeparatorWidth / 2"
:y="-svgSize.circleRadius * 1.4 + svgSize.circleRadius * 0.35"
:font-size="batteryModeIconSize"
text-anchor="middle"
dominant-baseline="central"
>
/
</text>
</template>
</g>
</g>
</g>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export interface MarginType {
bottom: number
}
export const evPriorityModes: [string, string][] = [
['EV', 'ev_mode'],
['Fzg./Verbr.', 'ev_mode'],
['Speicher', 'bat_mode'],
['MinSoc', 'min_soc_bat_mode'],
]
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ export const infotext: { [key: string]: string } = {
pricebased:
'Laden bei dynamischem Stromtarif, wenn eingestellter Maximalpreis unterboten wird.',
pvpriority:
'Ladepriorität bei PV-Produktion. Bevorzung von Fahzeugen, Speicher, oder Fahrzeugen bis zum eingestellten Mindest-Ladestand. Die Einstellung ist für alle Ladepunkte gleich.',
'Ladepriorität bei PV-Produktion. Vorrang für Fahrzeuge und gesteuerte Verbraucher, für den Speicher oder abhängig vom SoC des Speichers. Die Einstellung ist für alle Ladepunkte gleich.',
chargeTemplate: 'Ladeprofil für dieses Fahrzeug.',
ecoMinCurrent:
'Minimaler Ladestrom beim Preisladen. Bei PV-Überschuss kann der Strom höher sein.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export class PvSystem implements PowerItem {
}

export const evPriorityModes: [string, string][] = [
['EV', 'ev_mode'],
['Fzg./Verbr.', 'ev_mode'],
['Speicher', 'bat_mode'],
['MinSoc', 'min_soc_bat_mode'],
]
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,15 @@
type="button"
class="priorityModeBtn btn btn-secondary buttonTextSize"
:class="priorityButtonClass('ev_mode')"
title="Fahrzeuge und Verbraucher"
data-dismiss="modal"
priority="1"
@click="setBatteryPriority('ev_mode')"
>
EV
Fzg./Verbr.
<span class="fas fa-car ms-2">&nbsp;</span>
/
<span class="fas fa-plug ms-1">&nbsp;</span>
</button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ Hagen */
class="ps-1"
>
(
<i class="fa m-0" :class="priorityIcon" />)
<i class="fa m-0" :class="priorityIcon" />
<template v-if="globalData.pvBatteryPriority === 'ev_mode'">
/
<i class="fa fa-plug m-0" />
</template>
)
</span>
</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@
>
<div>Ladepriorität:</div>
<div class="row items-center">
<q-icon :name="batteryMode.icon" size="sm" color="primary" />
<template v-for="(icon, index) in batteryMode.icons" :key="index">
<q-icon :name="icon" size="sm" color="primary" />
<span class="q-mx-xs" v-if="index < batteryMode.icons.length - 1"
>/</span
>
</template>
<div>
{{ batteryMode.label }}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
v-for="mode in batteryModes"
:key="mode.value"
:color="batMode.value === mode.value ? 'primary' : 'grey'"
:label="mode.label"
:icon="mode.icon"
:outline="batMode.value !== mode.value"
size="sm"
@click="batMode.value = mode.value"
>
<template v-for="(icon, index) in mode.icons" :key="index">
<q-icon :name="icon" />
<span class="q-mx-xs" v-if="index < mode.icons.length - 1">/</span>
</template>
<span class="q-ml-xs">{{ mode.label }}</span>
<q-tooltip class="bg-primary">{{ mode.tooltip }}</q-tooltip>
</q-btn>
</q-btn-group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ const acChargingEnabled = computed(
const DC_POWER_FALLBACK = 300; // entspricht dc_max_current-Default 435 A

const dcMaxPower = computed(
() => mqttStore.chargePointDcMaxPower(props.chargePointId).value ?? DC_POWER_FALLBACK,
() =>
mqttStore.chargePointDcMaxPower(props.chargePointId).value ??
DC_POWER_FALLBACK,
);

const dcMinPower = computed(() => -dcMaxPower.value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ export interface ChartComponentRef {
}

export type Category =
| 'chargepoint'
| 'vehicle'
| 'battery'
| 'consumer'
| 'component';
'chargepoint' | 'vehicle' | 'battery' | 'consumer' | 'component';

export const CONSUMER_TOTAL_LABEL = 'Verbraucher ges.';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ export const useBatteryModes = () => {
const batteryModes = [
{
value: 'ev_mode',
label: 'Fahrzeuge',
label: 'Fzg./Verbr.',
color: 'primary',
icon: 'directions_car',
tooltip: 'Fahrzeuge',
icons: ['directions_car', 'power'],
tooltip: 'Fahrzeuge und Verbraucher',
},
{
value: 'bat_mode',
label: 'Speicher',
color: 'primary',
icon: 'battery_charging_full',
icons: ['battery_charging_full'],
tooltip: 'Speicher',
},
{
value: 'min_soc_bat_mode',
label: 'Nach SoC des Speichers',
color: 'primary',
icon: 'battery_4_bar',
icons: ['battery_4_bar'],
tooltip: 'Nach SoC des Speichers',
},
];
Expand Down
Loading