Skip to content

Commit

Permalink
fix: copy OnBattery-specific data from live view websocket
Browse files Browse the repository at this point in the history
  • Loading branch information
schlimmchen committed Feb 27, 2024
1 parent c72ae56 commit 6aa9dfb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webapp/src/components/InverterTotalInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ export default defineComponent({
totalData: { type: Object as PropType<Total>, required: true },
totalVeData: { type: Object as PropType<Vedirect>, required: true },
totalBattData: { type: Object as PropType<Battery>, required: true },
powerMeterData: { type: Object as PropType<Huawei>, required: true },
huaweiData: { type: Object as PropType<PowerMeter>, required: true },
powerMeterData: { type: Object as PropType<PowerMeter>, required: true },
huaweiData: { type: Object as PropType<Huawei>, required: true },
},
});
</script>
4 changes: 4 additions & 0 deletions webapp/src/views/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,10 @@ export default defineComponent({
const newData = JSON.parse(event.data);
Object.assign(this.liveData.total, newData.total);
Object.assign(this.liveData.hints, newData.hints);
Object.assign(this.liveData.vedirect, newData.vedirect);
Object.assign(this.liveData.huawei, newData.huawei);
Object.assign(this.liveData.battery, newData.battery);
Object.assign(this.liveData.power_meter, newData.power_meter);
const foundIdx = this.liveData.inverters.findIndex((element) => element.serial == newData.inverters[0].serial);
if (foundIdx == -1) {
Expand Down

0 comments on commit 6aa9dfb

Please sign in to comment.