diff --git a/src/components/devices/OpenwbConfigProxy.vue b/src/components/devices/OpenwbConfigProxy.vue index 91aeb3ab..442eb1e5 100644 --- a/src/components/devices/OpenwbConfigProxy.vue +++ b/src/components/devices/OpenwbConfigProxy.vue @@ -3,9 +3,9 @@ :is="getComponent()" :device="device" :component="component" - :configuration="component ? component.configuration : device.configuration" - :device-id="device.id" - :device-type="device.type" + :configuration="component ? component.configuration : device?.configuration" + :device-id="device?.id" + :device-type="device?.type" :component-id="component ? component.id : undefined" :component-type="component ? component.type : undefined" @update:configuration="updateConfiguration($event)" @@ -26,7 +26,7 @@ export default { emits: ["update:configuration"], methods: { getComponent() { - console.debug(`loading component: ${this.device.type} / ${this.component?.type}`); + console.debug(`loading component: ${this.device?.type} / ${this.component?.type}`); if (this.component !== undefined) { return defineAsyncComponent({ loader: () => import(`./${this.device.vendor}/${this.device.type}/${this.component.type}.vue`), @@ -34,7 +34,7 @@ export default { }); } else { return defineAsyncComponent({ - loader: () => import(`./${this.device.vendor}/${this.device.type}/device.vue`), + loader: () => import(`./${this.device.vendor}/${this.device?.type}/device.vue`), errorComponent: OpenwbDeviceConfigFallback, }); } diff --git a/src/views/ChargePointInstallation.vue b/src/views/ChargePointInstallation.vue index 36e417c3..2a04e017 100644 --- a/src/views/ChargePointInstallation.vue +++ b/src/views/ChargePointInstallation.vue @@ -526,17 +526,22 @@ export default { let chargePoints = this.getWildcardTopics("openWB/chargepoint/+/config"); let myObj = {}; for (const [key, element] of Object.entries(chargePoints)) { - if (element.type === "internal_openwb" || this.$store.state.mqtt["openWB/general/extern"] === false) { + if ( + element && + typeof element === "object" && + (element.type === "internal_openwb" || this.$store.state.mqtt["openWB/general/extern"] === false) + ) { myObj[key] = element; } } return myObj; }, }, - chargePointTemplates: { - get() { - return this.getWildcardTopics("openWB/chargepoint/template/+"); - }, + chargePointTemplates() { + const chargePointTemplates = this.getWildcardTopics("openWB/chargepoint/template/+"); + return Object.fromEntries( + Object.entries(chargePointTemplates).filter(([, template]) => template && typeof template === "object"), + ); }, chargePointTemplateList: { get() { diff --git a/src/views/HardwareInstallation.vue b/src/views/HardwareInstallation.vue index 55cc7119..ac9969d4 100644 --- a/src/views/HardwareInstallation.vue +++ b/src/views/HardwareInstallation.vue @@ -62,10 +62,10 @@
- +
@@ -89,15 +89,15 @@ Es wurden noch keine Komponenten zu diesem Gerät angelegt.