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 @@ -127,17 +127,15 @@
v-if="etData.active"
heading="Strompreis:"
class="grid-col-4 grid-left"
@click="showRawPrice = !showRawPrice"
>
<span :style="currentPriceStyle">{{ etData.etCurrentPriceString }} </span>
<span :style="currentPriceStyle">
{{ currentPriceToShow }}
</span>
</InfoItem>
<InfoItem v-if="cp.etActive" heading="max. Preis:" class="grid-col-4">
<span type="button" @click="editPrice = !editPrice"
>{{
props.chargepoint.etActive
? (Math.round(props.chargepoint.etMaxPrice * 10) / 10).toFixed(1) +
priceUnit
: '-'
}}
>{{ maxPriceToShow }}
<i
v-if="props.chargepoint.etActive"
class="fa-solid fa-sm fas fa-edit ms-2"
Expand Down Expand Up @@ -193,6 +191,7 @@ const cp = props.chargepoint
const editSoc = ref(false)
const editPrice = ref(false)
const changeCar = ref(false)
const showRawPrice = ref(false)

// computed
const chargeMode = computed({
Expand Down Expand Up @@ -257,6 +256,17 @@ const modePillStyle = computed(() => {
const priceUnit = computed(() => {
return globalData.country === 'ch' ? ' Rp' : ' ct'
})
const currentPriceToShow = computed(() => {
return showRawPrice.value
? etData.etCurrentPriceStringDetailed
: etData.etCurrentPriceString
})
const maxPriceToShow = computed(() => {
return showRawPrice.value
? props.chargepoint.etMaxPrice + priceUnit.value
: (Math.round(props.chargepoint.etMaxPrice * 10) / 10).toFixed(1) +
priceUnit.value
})
//methods
function loadSoc() {
updateServer('socUpdate', 1, props.chargepoint.connectedVehicle)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,6 @@ export const topVehicles = computed(() => {
} */ /*else if (result.length == 1) {
result.push(-1)
}*/
console.log(result)
return result
})
export const chargeLimitModes = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@
</div>
</transition>
<transition name="status-fade">
<div v-if="showFault" class="faulttext status-entry p-2">
<div
v-if="showFault && device && device.faultText"
class="faulttext status-entry p-2"
>
{{ device.faultText }}
</div>
</transition>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ function processConsumerDeviceMessages(topic: string, message: string) {
try {
const moduleData = JSON.parse(message)
if (moduleData) {
console.log(
'Consumer module data for consumer ' +
index +
' received: ' +
JSON.stringify(moduleData),
)
dev.name = moduleData.name
dev.icon = moduleData.name
}
Expand All @@ -43,6 +49,12 @@ function processConsumerDeviceMessages(topic: string, message: string) {
try {
const usage = JSON.parse(message)
if (usage) {
console.log(
'Consumer usage data for consumer ' +
index +
' received: ' +
JSON.stringify(usage),
)
dev.usage = usage
}
} catch (e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<template #title>
{{ heading }}
<span
v-if="graphData.errors.length > 0"
v-if="graphData.errors.length > 0 && graphData.errors[0] != ''"
@click="showErrors = !showErrors"
class="fa-solid fa-triangle-exclamation ms-2"
/>
Expand Down Expand Up @@ -35,7 +35,10 @@
</template>
<div v-if="showErrors" class="errormessage d-flex flex-column mt-2 mb-2">
{{ graphData.errors[0] }}
<span class="morebutton" @click="showErrorModal"
<span
v-if="graphData.errors.length > 1"
class="morebutton"
@click="showErrorModal"
>({{ graphData.errors.length - 1 }} weitere Fehlermeldungen)
</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export function processDayGraphMessages(topic: string, message: string) {
totals: energyValues,
message: errorTextBlock,
} = JSON.parse(message)
graphData.errors = errorTextBlock.split('\n')
const errorTextBlockTemp = ''
graphData.errors = errorTextBlockTemp.split('\n')
itemNames.value = new Map(Object.entries(itemNames2))
resetHistoricData()
gridCounters = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ class EtData {
}
}

get etCurrentPriceStringDetailed() {
if (this.etPriceList.size > 0) {
const [p] = this.etPriceList.values()
return p + (globalData.country === 'ch' ? ' Rp' : ' ct')
} else {
return '---'
}
}

maxPriceForDuration(durationMinutes: number, maxTime?: Date): number {
if (this.etPriceList.size > 0) {
const plist = maxTime
Expand Down
Loading