Skip to content

Commit

Permalink
Merge pull request #466 from rleidner/bmwbc_ui
Browse files Browse the repository at this point in the history
configuration ui BMW-bimmer
  • Loading branch information
LKuemmel authored Jun 12, 2024
2 parents cbdaad0 + 0afcbe6 commit 92f7349
Showing 1 changed file with 83 additions and 0 deletions.
83 changes: 83 additions & 0 deletions src/components/vehicles/bmwbc/vehicle.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<template>
<div class="vehicle-soc-bmwbc">
<openwb-base-text-input
title="Benutzername"
required
subtype="user"
:model-value="vehicle.configuration.user_id"
@update:model-value="
updateConfiguration($event, 'configuration.user_id')
"
>
<template #help>
Der Benutzername für die Anmeldung an den BMW-Servern.
</template>
</openwb-base-text-input>
<openwb-base-text-input
title="Kennwort"
required
subtype="password"
:model-value="vehicle.configuration.password"
@update:model-value="
updateConfiguration($event, 'configuration.password')
"
>
<template #help>
Das Passwort für die Anmeldung an den BMW-Servern.
</template>
</openwb-base-text-input>
<openwb-base-text-input
title="VIN"
required
:model-value="vehicle.configuration.vin"
@update:model-value="
updateConfiguration($event, 'configuration.vin')
"
>
<template #help> Die Fahrgestellnummer des Fahrzeugs. </template>
</openwb-base-text-input>
<openwb-base-button-group-input
title="SoC während der Ladung berechnen"
:buttons="[
{
buttonValue: false,
text: 'Nein',
class: 'btn-outline-danger',
},
{
buttonValue: true,
text: 'Ja',
class: 'btn-outline-success',
},
]"
:model-value="vehicle.configuration.calculate_soc"
@update:model-value="
updateConfiguration($event, 'configuration.calculate_soc')
"
>
<template #help>
Berechnet den Ladestand (SoC) während der Ladung. <br />
Die Berechnung erfolgt über die Ladeleistung und die Ladedauer. <br />
</template>
</openwb-base-button-group-input>
</div>
</template>

<script>
export default {
name: "VehicleSocBmw-bimmer_connected",
emits: ["update:configuration"],
props: {
vehicleId: { required: true, type: Number },
vehicle: { required: true, type: Object },
},
data() {
return {};
},
methods: {
updateConfiguration(event, path = undefined) {
this.$emit("update:configuration", { value: event, object: path });
},
},
};
</script>

0 comments on commit 92f7349

Please sign in to comment.