Skip to content

Commit 3e8180e

Browse files
committed
#added servePrice to GeneralChargeConfig
1 parent 377404b commit 3e8180e

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/components/electricity_tariffs/energycharts/electricity_tariff.vue

+11-3
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,16 @@
6868
:step="0.001"
6969
:precision="3"
7070
unit="ct/kWh"
71+
:model-value="
72+
$store.state.mqtt['openWB/general/prices/servePrice'] *
73+
100000
74+
"
7175
@update:model-value="
72-
updateConfiguration(parseFloat(($event).toFixed(7)), 'configuration.servePrice')
76+
updateState(
77+
'openWB/general/prices/servePrice',
78+
parseFloat(($event / 100000).toFixed(7)),
79+
);
80+
updateConfiguration(parseFloat(($event).toFixed(7)), 'configuration.servePrice')
7381
"
7482
>
7583
<template #help>
@@ -85,10 +93,10 @@
8593
</template>
8694

8795
<script>
88-
96+
import ComponentState from "/opt/openWB-dev/openwb-ui-settings/src/components/mixins/ComponentState.vue";
8997
export default {
9098
name: "ElectricityTariffEnergyCharts",
91-
mixins: [],
99+
mixins: [ComponentState],
92100
emits: ["update:configuration"],
93101
props: {
94102
electricityTariff: { type: Object, required: true },

src/views/GeneralChargeConfig.vue

+1
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ export default {
279279
"openWB/general/prices/pv",
280280
"openWB/optional/et/provider",
281281
"openWB/system/configurable/electricity_tariffs",
282+
"openWB/general/prices/servePrice",
282283
],
283284
};
284285
},

0 commit comments

Comments
 (0)