Skip to content

Commit f98da12

Browse files
committed
Fix battery soc not displayed
1 parent 40b52a7 commit f98da12

File tree

6 files changed

+7283
-7279
lines changed

6 files changed

+7283
-7279
lines changed

assets/js/app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { library } from "@fortawesome/fontawesome-svg-core";
66
import { faSun } from "@fortawesome/free-solid-svg-icons/faSun";
77
import { faArrowUp } from "@fortawesome/free-solid-svg-icons/faArrowUp";
88
import { faArrowDown } from "@fortawesome/free-solid-svg-icons/faArrowDown";
9+
import { faBatteryThreeQuarters } from "@fortawesome/free-solid-svg-icons/faBatteryThreeQuarters";
910
import { faTemperatureLow } from "@fortawesome/free-solid-svg-icons/faTemperatureLow";
1011
import { faTemperatureHigh } from "@fortawesome/free-solid-svg-icons/faTemperatureHigh";
1112
import { faThermometerHalf } from "@fortawesome/free-solid-svg-icons/faThermometerHalf";
@@ -23,6 +24,7 @@ library.add(
2324
faSun,
2425
faArrowUp,
2526
faArrowDown,
27+
faBatteryThreeQuarters,
2628
faTemperatureLow,
2729
faTemperatureHigh,
2830
faThermometerHalf,

assets/js/components/LoadpointDetails.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
class="text-primary ml-1"
88
icon="temperature-low"
99
v-if="state.climater == 'heating'"
10-
/>
10+
></fa-icon>
1111
<fa-icon
1212
class="text-primary ml-1"
1313
icon="temperature-high"
1414
v-if="state.climater == 'cooling'"
15-
/>
15+
></fa-icon>
1616
<fa-icon
1717
class="text-primary ml-1"
1818
icon="thermometer-half"
1919
v-if="state.climater == 'on'"
20-
/>
20+
></fa-icon>
2121
</div>
2222
<h2 class="value">
2323
{{ fmt(state.chargePower) }}

assets/js/components/MessageToast.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<div class="toast" data-delay="10000" v-bind:data-autohide="true">
33
<div class="toast-header">
44
<strong class="mr-auto" v-if="item.type != 'warn'"
5-
><fa-icon class="text-danger" icon="exclamation-triangle" /> Error</strong
5+
><fa-icon class="text-danger" icon="exclamation-triangle"></fa-icon> Error</strong
66
>
77
<strong class="mr-auto" v-if="item.type == 'warn'"
8-
><fa-icon class="text-warning" icon="exclamation-triangle" />
8+
><fa-icon class="text-warning" icon="exclamation-triangle"></fa-icon>
99
Warning</strong
1010
>
1111
<small v-if="item.status">HTTP {{ item.status }}</small>

assets/js/components/SiteDetails.vue

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<div class="row">
33
<div class="col-6 col-md-3 mt-3" v-if="state.gridConfigured">
44
<div class="mb-2 value" v-if="state.gridPower > 0">
5-
Bezug <fa-icon icon="arrow-down" class="text-primary" />
5+
Bezug <fa-icon icon="arrow-down" class="text-primary"></fa-icon>
66
</div>
77
<div class="mb-2 value" v-else>
8-
Einspeisung <fa-icon icon="arrow-up" class="text-primary" />
8+
Einspeisung <fa-icon icon="arrow-up" class="text-primary"></fa-icon>
99
</div>
1010
<h2 class="value">
1111
{{ fmt(state.gridPower) }}
@@ -21,49 +21,44 @@
2121
'text-primary': state.pvPower < 0,
2222
'text-muted': state.pvPower >= 0,
2323
}"
24-
/>
24+
></fa-icon>
2525
</div>
2626
<h2 class="value">
2727
{{ fmt(state.pvPower) }}
2828
<small class="text-muted">{{ fmtUnit(state.pvPower) }}W</small>
2929
</h2>
3030
</div>
31-
<div
32-
class="d-md-block col-6 col-md-3 mt-3"
33-
v-bind:class="{ 'd-none': !state.batterySoC }"
34-
v-if="state.batteryConfigured"
35-
>
31+
<div class="d-md-block col-6 col-md-3 mt-3" v-if="state.batteryConfigured">
3632
<div class="mb-2 value">
3733
Batterie
3834
<fa-icon
3935
class="text-primary"
4036
icon="arrow-down"
4137
v-if="state.batteryPower < 0"
42-
/>
38+
></fa-icon>
4339
<fa-icon
4440
class="text-primary"
4541
icon="arrow-up"
4642
v-if="state.batteryPower > 0"
47-
/>
43+
></fa-icon>
4844
</div>
4945
<h2 class="value">
5046
{{ fmt(state.batteryPower) }}
5147
<small class="text-muted">{{ fmtUnit(state.batteryPower) }}W</small>
5248
</h2>
5349
</div>
54-
<div class="col-6 col-md-3 mt-3" v-if="state.batterySoC">
50+
<div class="col-6 col-md-3 mt-3" v-if="state.batteryConfigured">
5551
<div class="mb-2 value">
5652
SoC
5753
<fa-icon
58-
class="text-primary"
5954
icon="battery-three-quarters"
6055
v-bind:class="{
6156
'text-primary': state.batteryPower > 0,
6257
'text-muted': state.batteryPower < 0,
6358
}"
64-
/>
59+
></fa-icon>
6560
</div>
66-
<h2 class="value">{{ state.batterySoC }} <small class="text-muted">%</small></h2>
61+
<h2 class="value">{{ state.batterySoC || 0 }} <small class="text-muted">%</small></h2>
6762
</div>
6863
</div>
6964
</template>

assets/js/components/Version.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
>
1313
<a href="#" class="text-body">
1414
Release notes
15-
<fa-icon icon="chevron-up" v-if="notesShown" />
16-
<fa-icon icon="chevron-down" v-if="!notesShown" />
15+
<fa-icon icon="chevron-up" v-if="notesShown"></fa-icon>
16+
<fa-icon icon="chevron-down" v-else></fa-icon>
1717
</a>
1818
</b>
1919
<b class="px-3">
@@ -23,7 +23,7 @@
2323
"
2424
class="text-body"
2525
>
26-
Download <fa-icon icon="chevron-down" />
26+
Download <fa-icon icon="chevron-down"></fa-icon>
2727
</a>
2828
</b>
2929
<button

0 commit comments

Comments
 (0)