From 5972ef2c3549fe1c8fd253e32cf32124f5533333 Mon Sep 17 00:00:00 2001 From: retr0 <42kdesigners@gmail.com> Date: Tue, 28 Apr 2026 22:31:06 +0200 Subject: [PATCH] Feature: Wallbox-Node nur wenn KATHREIN_WALLBOX konfiguriert (v1.6.6) - hasEV-Flag aus invertersList: nur KATHREIN_WALLBOX zeigt EV-Node - Ohne Wallbox: flacheres Layout (viewBox 520x278 statt 410) - SEG-Array und SVG-Node konditionell Co-Authored-By: Claude Sonnet 4.6 --- haos-addon/config.yaml | 2 +- haos-addon/src/web/index.html | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/haos-addon/config.yaml b/haos-addon/config.yaml index a23646b..102f82b 100644 --- a/haos-addon/config.yaml +++ b/haos-addon/config.yaml @@ -1,5 +1,5 @@ name: ShineBridge -version: "1.6.5" +version: "1.6.6" slug: shinebridge description: Growatt Wechselrichter lokal in Home Assistant — Modbus TCP via ShineLAN-X, MQTT Discovery, Web UI url: https://gitea.bitfire.work/retr0/shinebridge diff --git a/haos-addon/src/web/index.html b/haos-addon/src/web/index.html index 2f40b04..ec81778 100644 --- a/haos-addon/src/web/index.html +++ b/haos-addon/src/web/index.html @@ -378,6 +378,7 @@ function renderEnergy(inverters, aggregates) { const gridExport = Math.max(0, -gridW); const houseW = Math.max(0, pvW + gridImport + batDchW - batChW - evW); const hasBat = Object.keys(aggregates).some(k => k.startsWith('bat_')); + const hasEV = invertersList.some(c => c.inverter_model === 'KATHREIN_WALLBOX'); const T = 20; const pvOn = pvW > T; @@ -450,12 +451,12 @@ function renderEnergy(inverters, aggregates) { // Path segments (bezier from node-edge to node-edge) // Solar(145,75) bottom→ House(260,180) top; Grid(375,75) bottom→ House top // House bottom → Battery(145,292) top; House bottom → EV(375,292) top - // Kreuz-Layout: Solar oben, Grid links, Haus Mitte, Batterie rechts, Wallbox unten + // Kreuz-Layout: Solar oben, Grid links, Haus Mitte, Batterie rechts, Wallbox unten (optional) const SEG = [ { id:'ep-pv', d:`M 260,121 C 258,138 262,146 260,158`, col:C.pv, on:pvOn, rev:false }, { id:'ep-grid', d:`M 140,200 C 162,197 192,203 214,200`, col:impOn?C.imp:C.exp, on:impOn||expOn, rev:expOn }, { id:'ep-bat', d:`M 306,200 C 330,197 356,203 380,200`, col:C.bat, on:chOn||dchOn, rev:dchOn }, - { id:'ep-ev', d:`M 260,244 C 258,261 262,269 260,279`, col:C.ev, on:evOn, rev:false }, + ...(hasEV ? [{ id:'ep-ev', d:`M 260,244 C 258,261 262,269 260,279`, col:C.ev, on:evOn, rev:false }] : []), ]; const defs = SEG.map(s => ``).join(''); @@ -471,8 +472,8 @@ function renderEnergy(inverters, aggregates) { const batLbl = chOn ? 'LADEN' : dchOn ? 'ENTLADEN' : 'BATTERIE'; const batSub = batSoc != null ? Math.round(batSoc) + '%' : ''; - // ViewBox: Grid-left=51, Bat-right=469, Solar-top=33, EV-bottom=367 → 520×410 - const svg = ` + const svgH = hasEV ? 410 : 278; + const svg = ` ${defs} ${lines} ${dotsSvg} @@ -480,7 +481,7 @@ function renderEnergy(inverters, aggregates) { ${node( 95, 200, 'grid', gridLbl, gridVal, gridCol, impOn||expOn, '')} ${node(260, 200, 'house', 'HAUS', houseW, C.txt, true, '')} ${node(425, 200, 'bat', batLbl, batVal, C.bat, chOn||dchOn, batSub)} - ${node(260, 323, 'ev', 'WALLBOX', evW, C.ev, evOn, '')} + ${hasEV ? node(260, 323, 'ev', 'WALLBOX', evW, C.ev, evOn, '') : ''} `; function kwhCard(label, val, col) {