Feature: Show inverter status and current power in overview (if multiple inverters are available)

This commit is contained in:
Thomas Basler 2024-12-18 21:21:10 +01:00
parent 940027ab19
commit 8f60a3a12a

View File

@ -31,12 +31,22 @@
> >
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<div class="me-2"> <div class="me-2">
<BIconXCircleFill class="fs-4" v-if="!inverter.reachable" /> <span
<BIconExclamationCircleFill v-if="inverter.AC"
class="fs-4" class="badge"
v-if="inverter.reachable && !inverter.producing" :class="{
/> 'text-bg-secondary': !inverter.poll_enabled,
<BIconCheckCircleFill class="fs-4" v-if="inverter.reachable && inverter.producing" /> 'text-bg-danger': inverter.poll_enabled && !inverter.reachable,
'text-bg-warning':
inverter.poll_enabled && inverter.reachable && !inverter.producing,
'text-bg-success':
inverter.poll_enabled && inverter.reachable && inverter.producing,
}"
>
{{ $n(inverter.AC[0]?.Power?.v || 0, 'decimalNoDigits') }}
{{ inverter.AC[0].Power?.u }}
</span>
<span v-else class="badge text-bg-light">-</span>
</div> </div>
<div class="ms-auto me-auto"> <div class="ms-auto me-auto">
{{ inverter.name }} {{ inverter.name }}
@ -513,9 +523,7 @@ import * as bootstrap from 'bootstrap';
import { import {
BIconArrowCounterclockwise, BIconArrowCounterclockwise,
BIconBroadcast, BIconBroadcast,
BIconCheckCircleFill,
BIconCpu, BIconCpu,
BIconExclamationCircleFill,
BIconInfoCircle, BIconInfoCircle,
BIconJournalText, BIconJournalText,
BIconOutlet, BIconOutlet,
@ -523,7 +531,6 @@ import {
BIconSpeedometer, BIconSpeedometer,
BIconToggleOff, BIconToggleOff,
BIconToggleOn, BIconToggleOn,
BIconXCircleFill,
} from 'bootstrap-icons-vue'; } from 'bootstrap-icons-vue';
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
@ -540,9 +547,7 @@ export default defineComponent({
ModalDialog, ModalDialog,
BIconArrowCounterclockwise, BIconArrowCounterclockwise,
BIconBroadcast, BIconBroadcast,
BIconCheckCircleFill,
BIconCpu, BIconCpu,
BIconExclamationCircleFill,
BIconInfoCircle, BIconInfoCircle,
BIconJournalText, BIconJournalText,
BIconOutlet, BIconOutlet,
@ -550,7 +555,6 @@ export default defineComponent({
BIconSpeedometer, BIconSpeedometer,
BIconToggleOff, BIconToggleOff,
BIconToggleOn, BIconToggleOn,
BIconXCircleFill,
}, },
data() { data() {
return { return {