Fix: Grid-Icon (Sinuswelle statt A), Batterie-Node immer sichtbar (v1.6.3)
- Grid-Icon: Sinuswelle (AC-Symbol) statt A-förmiger Übertragungsturm - Batterie-Node: wird angezeigt sobald bat_* Aggregate vorhanden, nicht erst wenn bat_soc != null - batSub: SOC-Prozent nur wenn bat_soc nicht null Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -377,7 +377,7 @@ function renderEnergy(inverters, aggregates) {
|
||||
const gridImport = Math.max(0, gridW);
|
||||
const gridExport = Math.max(0, -gridW);
|
||||
const houseW = Math.max(0, pvW + gridImport + batDchW - batChW - evW);
|
||||
const hasBat = batSoc !== undefined && batSoc !== null;
|
||||
const hasBat = Object.keys(aggregates).some(k => k.startsWith('bat_'));
|
||||
|
||||
const T = 20;
|
||||
const pvOn = pvW > T;
|
||||
@@ -404,7 +404,7 @@ function renderEnergy(inverters, aggregates) {
|
||||
const ICONS = {
|
||||
solar:`<circle cx="10" cy="10" r="3.2" fill="none" stroke-width="1.7"/>
|
||||
<path d="M10,1.5v3M10,15.5v3M1.5,10h3M15.5,10h3M4.1,4.1l2.1,2.1M13.8,13.8l2.1,2.1M15.9,4.1l-2.1,2.1M6.2,13.8l-2.1,2.1" stroke-width="1.7" stroke-linecap="round"/>`,
|
||||
grid: `<path d="M10,1.5 L3.5,17 M10,1.5 L16.5,17 M5.5,10.5 L14.5,10.5 M4.5,14 L15.5,14" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" fill="none"/>`,
|
||||
grid: `<path d="M1.5,10 C3.5,3 6.5,3 8.5,10 C10.5,17 13.5,17 15.5,10 C16.5,6.5 17.5,6.5 18.5,10" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" fill="none"/>`,
|
||||
house:`<path d="M1.5,9.5 L10,2 L18.5,9.5" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
|
||||
<path d="M3.5,9.5 L3.5,18 L16.5,18 L16.5,9.5" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
|
||||
<path d="M7.5,18 L7.5,13 Q7.5,11 10,11 Q12.5,11 12.5,13 L12.5,18" stroke-width="1.7" stroke-linecap="round" fill="none"/>`,
|
||||
@@ -470,7 +470,7 @@ function renderEnergy(inverters, aggregates) {
|
||||
const gridVal = impOn ? gridImport : gridExport;
|
||||
const batVal = chOn ? batChW : dchOn ? batDchW : 0;
|
||||
const batLbl = chOn ? 'LADEN' : dchOn ? 'ENTLADEN' : 'BATTERIE';
|
||||
const batSub = hasBat ? Math.round(batSoc) + '%' : '';
|
||||
const batSub = batSoc != null ? Math.round(batSoc) + '%' : '';
|
||||
|
||||
const svg = `<svg viewBox="0 0 520 360" width="100%" style="display:block;padding:20px 10px" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>${defs}</defs>
|
||||
|
||||
Reference in New Issue
Block a user