Fix battery soc not displayed
This commit is contained in:
parent
40b52a7a1f
commit
f98da12831
6 changed files with 7283 additions and 7279 deletions
|
|
@ -6,6 +6,7 @@ import { library } from "@fortawesome/fontawesome-svg-core";
|
||||||
import { faSun } from "@fortawesome/free-solid-svg-icons/faSun";
|
import { faSun } from "@fortawesome/free-solid-svg-icons/faSun";
|
||||||
import { faArrowUp } from "@fortawesome/free-solid-svg-icons/faArrowUp";
|
import { faArrowUp } from "@fortawesome/free-solid-svg-icons/faArrowUp";
|
||||||
import { faArrowDown } from "@fortawesome/free-solid-svg-icons/faArrowDown";
|
import { faArrowDown } from "@fortawesome/free-solid-svg-icons/faArrowDown";
|
||||||
|
import { faBatteryThreeQuarters } from "@fortawesome/free-solid-svg-icons/faBatteryThreeQuarters";
|
||||||
import { faTemperatureLow } from "@fortawesome/free-solid-svg-icons/faTemperatureLow";
|
import { faTemperatureLow } from "@fortawesome/free-solid-svg-icons/faTemperatureLow";
|
||||||
import { faTemperatureHigh } from "@fortawesome/free-solid-svg-icons/faTemperatureHigh";
|
import { faTemperatureHigh } from "@fortawesome/free-solid-svg-icons/faTemperatureHigh";
|
||||||
import { faThermometerHalf } from "@fortawesome/free-solid-svg-icons/faThermometerHalf";
|
import { faThermometerHalf } from "@fortawesome/free-solid-svg-icons/faThermometerHalf";
|
||||||
|
|
@ -23,6 +24,7 @@ library.add(
|
||||||
faSun,
|
faSun,
|
||||||
faArrowUp,
|
faArrowUp,
|
||||||
faArrowDown,
|
faArrowDown,
|
||||||
|
faBatteryThreeQuarters,
|
||||||
faTemperatureLow,
|
faTemperatureLow,
|
||||||
faTemperatureHigh,
|
faTemperatureHigh,
|
||||||
faThermometerHalf,
|
faThermometerHalf,
|
||||||
|
|
|
||||||
|
|
@ -7,17 +7,17 @@
|
||||||
class="text-primary ml-1"
|
class="text-primary ml-1"
|
||||||
icon="temperature-low"
|
icon="temperature-low"
|
||||||
v-if="state.climater == 'heating'"
|
v-if="state.climater == 'heating'"
|
||||||
/>
|
></fa-icon>
|
||||||
<fa-icon
|
<fa-icon
|
||||||
class="text-primary ml-1"
|
class="text-primary ml-1"
|
||||||
icon="temperature-high"
|
icon="temperature-high"
|
||||||
v-if="state.climater == 'cooling'"
|
v-if="state.climater == 'cooling'"
|
||||||
/>
|
></fa-icon>
|
||||||
<fa-icon
|
<fa-icon
|
||||||
class="text-primary ml-1"
|
class="text-primary ml-1"
|
||||||
icon="thermometer-half"
|
icon="thermometer-half"
|
||||||
v-if="state.climater == 'on'"
|
v-if="state.climater == 'on'"
|
||||||
/>
|
></fa-icon>
|
||||||
</div>
|
</div>
|
||||||
<h2 class="value">
|
<h2 class="value">
|
||||||
{{ fmt(state.chargePower) }}
|
{{ fmt(state.chargePower) }}
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
<div class="toast" data-delay="10000" v-bind:data-autohide="true">
|
<div class="toast" data-delay="10000" v-bind:data-autohide="true">
|
||||||
<div class="toast-header">
|
<div class="toast-header">
|
||||||
<strong class="mr-auto" v-if="item.type != 'warn'"
|
<strong class="mr-auto" v-if="item.type != 'warn'"
|
||||||
><fa-icon class="text-danger" icon="exclamation-triangle" /> Error</strong
|
><fa-icon class="text-danger" icon="exclamation-triangle"></fa-icon> Error</strong
|
||||||
>
|
>
|
||||||
<strong class="mr-auto" v-if="item.type == 'warn'"
|
<strong class="mr-auto" v-if="item.type == 'warn'"
|
||||||
><fa-icon class="text-warning" icon="exclamation-triangle" />
|
><fa-icon class="text-warning" icon="exclamation-triangle"></fa-icon>
|
||||||
Warning</strong
|
Warning</strong
|
||||||
>
|
>
|
||||||
<small v-if="item.status">HTTP {{ item.status }}</small>
|
<small v-if="item.status">HTTP {{ item.status }}</small>
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6 col-md-3 mt-3" v-if="state.gridConfigured">
|
<div class="col-6 col-md-3 mt-3" v-if="state.gridConfigured">
|
||||||
<div class="mb-2 value" v-if="state.gridPower > 0">
|
<div class="mb-2 value" v-if="state.gridPower > 0">
|
||||||
Bezug <fa-icon icon="arrow-down" class="text-primary" />
|
Bezug <fa-icon icon="arrow-down" class="text-primary"></fa-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-2 value" v-else>
|
<div class="mb-2 value" v-else>
|
||||||
Einspeisung <fa-icon icon="arrow-up" class="text-primary" />
|
Einspeisung <fa-icon icon="arrow-up" class="text-primary"></fa-icon>
|
||||||
</div>
|
</div>
|
||||||
<h2 class="value">
|
<h2 class="value">
|
||||||
{{ fmt(state.gridPower) }}
|
{{ fmt(state.gridPower) }}
|
||||||
|
|
@ -21,49 +21,44 @@
|
||||||
'text-primary': state.pvPower < 0,
|
'text-primary': state.pvPower < 0,
|
||||||
'text-muted': state.pvPower >= 0,
|
'text-muted': state.pvPower >= 0,
|
||||||
}"
|
}"
|
||||||
/>
|
></fa-icon>
|
||||||
</div>
|
</div>
|
||||||
<h2 class="value">
|
<h2 class="value">
|
||||||
{{ fmt(state.pvPower) }}
|
{{ fmt(state.pvPower) }}
|
||||||
<small class="text-muted">{{ fmtUnit(state.pvPower) }}W</small>
|
<small class="text-muted">{{ fmtUnit(state.pvPower) }}W</small>
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="d-md-block col-6 col-md-3 mt-3" v-if="state.batteryConfigured">
|
||||||
class="d-md-block col-6 col-md-3 mt-3"
|
|
||||||
v-bind:class="{ 'd-none': !state.batterySoC }"
|
|
||||||
v-if="state.batteryConfigured"
|
|
||||||
>
|
|
||||||
<div class="mb-2 value">
|
<div class="mb-2 value">
|
||||||
Batterie
|
Batterie
|
||||||
<fa-icon
|
<fa-icon
|
||||||
class="text-primary"
|
class="text-primary"
|
||||||
icon="arrow-down"
|
icon="arrow-down"
|
||||||
v-if="state.batteryPower < 0"
|
v-if="state.batteryPower < 0"
|
||||||
/>
|
></fa-icon>
|
||||||
<fa-icon
|
<fa-icon
|
||||||
class="text-primary"
|
class="text-primary"
|
||||||
icon="arrow-up"
|
icon="arrow-up"
|
||||||
v-if="state.batteryPower > 0"
|
v-if="state.batteryPower > 0"
|
||||||
/>
|
></fa-icon>
|
||||||
</div>
|
</div>
|
||||||
<h2 class="value">
|
<h2 class="value">
|
||||||
{{ fmt(state.batteryPower) }}
|
{{ fmt(state.batteryPower) }}
|
||||||
<small class="text-muted">{{ fmtUnit(state.batteryPower) }}W</small>
|
<small class="text-muted">{{ fmtUnit(state.batteryPower) }}W</small>
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 col-md-3 mt-3" v-if="state.batterySoC">
|
<div class="col-6 col-md-3 mt-3" v-if="state.batteryConfigured">
|
||||||
<div class="mb-2 value">
|
<div class="mb-2 value">
|
||||||
SoC
|
SoC
|
||||||
<fa-icon
|
<fa-icon
|
||||||
class="text-primary"
|
|
||||||
icon="battery-three-quarters"
|
icon="battery-three-quarters"
|
||||||
v-bind:class="{
|
v-bind:class="{
|
||||||
'text-primary': state.batteryPower > 0,
|
'text-primary': state.batteryPower > 0,
|
||||||
'text-muted': state.batteryPower < 0,
|
'text-muted': state.batteryPower < 0,
|
||||||
}"
|
}"
|
||||||
/>
|
></fa-icon>
|
||||||
</div>
|
</div>
|
||||||
<h2 class="value">{{ state.batterySoC }} <small class="text-muted">%</small></h2>
|
<h2 class="value">{{ state.batterySoC || 0 }} <small class="text-muted">%</small></h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@
|
||||||
>
|
>
|
||||||
<a href="#" class="text-body">
|
<a href="#" class="text-body">
|
||||||
Release notes
|
Release notes
|
||||||
<fa-icon icon="chevron-up" v-if="notesShown" />
|
<fa-icon icon="chevron-up" v-if="notesShown"></fa-icon>
|
||||||
<fa-icon icon="chevron-down" v-if="!notesShown" />
|
<fa-icon icon="chevron-down" v-else></fa-icon>
|
||||||
</a>
|
</a>
|
||||||
</b>
|
</b>
|
||||||
<b class="px-3">
|
<b class="px-3">
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
"
|
"
|
||||||
class="text-body"
|
class="text-body"
|
||||||
>
|
>
|
||||||
Download <fa-icon icon="chevron-down" />
|
Download <fa-icon icon="chevron-down"></fa-icon>
|
||||||
</a>
|
</a>
|
||||||
</b>
|
</b>
|
||||||
<button
|
<button
|
||||||
|
|
|
||||||
14521
server/assets.go
14521
server/assets.go
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue