Redesign: Kreuz-Layout — Solar oben, Grid links, Haus Mitte, Batterie rechts, EV unten (v1.6.5)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
retr0
2026-04-28 22:27:35 +02:00
parent 9eef66812b
commit 220a16c13d
2 changed files with 13 additions and 12 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: ShineBridge name: ShineBridge
version: "1.6.4" version: "1.6.5"
slug: shinebridge slug: shinebridge
description: Growatt Wechselrichter lokal in Home Assistant — Modbus TCP via ShineLAN-X, MQTT Discovery, Web UI description: Growatt Wechselrichter lokal in Home Assistant — Modbus TCP via ShineLAN-X, MQTT Discovery, Web UI
url: https://gitea.bitfire.work/retr0/shinebridge url: https://gitea.bitfire.work/retr0/shinebridge
+12 -11
View File
@@ -450,12 +450,12 @@ function renderEnergy(inverters, aggregates) {
// Path segments (bezier from node-edge to node-edge) // Path segments (bezier from node-edge to node-edge)
// Solar(145,75) bottom→ House(260,180) top; Grid(375,75) bottom→ House top // 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 // House bottom → Battery(145,292) top; House bottom → EV(375,292) top
// Alle 5 Nodes immer anzeigen — Batterie nur gedimmt wenn inaktiv // Kreuz-Layout: Solar oben, Grid links, Haus Mitte, Batterie rechts, Wallbox unten
const SEG = [ const SEG = [
{ id:'ep-pv', d:`M 145,128 C 145,172 260,172 260,158`, col:C.pv, on:pvOn, rev:false }, { 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 375,128 C 375,172 260,172 260,158`, col:impOn?C.imp:C.exp, on:impOn||expOn, rev:expOn }, { 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 247,246 C 213,282 145,282 145,276`, col:C.bat, on:chOn||dchOn, rev:dchOn }, { 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 273,246 C 307,282 375,282 375,276`, col:C.ev, on:evOn, rev:false }, { 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 => `<path id="${s.id}" d="${s.d}" fill="none"/>`).join(''); const defs = SEG.map(s => `<path id="${s.id}" d="${s.d}" fill="none"/>`).join('');
@@ -471,15 +471,16 @@ function renderEnergy(inverters, aggregates) {
const batLbl = chOn ? 'LADEN' : dchOn ? 'ENTLADEN' : 'BATTERIE'; const batLbl = chOn ? 'LADEN' : dchOn ? 'ENTLADEN' : 'BATTERIE';
const batSub = batSoc != null ? Math.round(batSoc) + '%' : ''; const batSub = batSoc != null ? Math.round(batSoc) + '%' : '';
const svg = `<svg viewBox="0 0 520 400" width="100%" style="display:block" xmlns="http://www.w3.org/2000/svg"> // ViewBox: Grid-left=51, Bat-right=469, Solar-top=33, EV-bottom=367 → 520×410
const svg = `<svg viewBox="0 0 520 410" width="100%" style="display:block" xmlns="http://www.w3.org/2000/svg">
<defs>${defs}</defs> <defs>${defs}</defs>
${lines} ${lines}
${dotsSvg} ${dotsSvg}
${node(145, 84, 'solar', 'SOLAR', pvW, C.pv, pvOn, '')} ${node(260, 77, 'solar', 'SOLAR', pvW, C.pv, pvOn, '')}
${node(375, 84, 'grid', gridLbl, gridVal, gridCol, impOn||expOn, '')} ${node( 95, 200, 'grid', gridLbl, gridVal, gridCol, impOn||expOn, '')}
${node(260, 202, 'house', 'HAUS', houseW, C.txt, true, '')} ${node(260, 200, 'house', 'HAUS', houseW, C.txt, true, '')}
${node(145, 320, 'bat', batLbl, batVal, C.bat, chOn||dchOn, batSub)} ${node(425, 200, 'bat', batLbl, batVal, C.bat, chOn||dchOn, batSub)}
${node(375, 320, 'ev', 'WALLBOX', evW, C.ev, evOn, '')} ${node(260, 323, 'ev', 'WALLBOX', evW, C.ev, evOn, '')}
</svg>`; </svg>`;
function kwhCard(label, val, col) { function kwhCard(label, val, col) {