From 0d29739fc86938667b92ba56d038b95ea49bb12e Mon Sep 17 00:00:00 2001 From: retr0 <42kdesigners@gmail.com> Date: Wed, 29 Apr 2026 07:46:46 +0200 Subject: [PATCH] Fix: Batterie-Flussrichtung via Nettoleistung (v1.7.3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vorher: rev:dchOn — bei gleichzeitig aktiven bat_charge/discharge (Messrauschen) zeigte die Richtung Entladen obwohl Laden aktiv war. Jetzt: rev:!(batChW >= batDchW) — Richtung folgt dem Nettostrom. Co-Authored-By: Claude Sonnet 4.6 --- haos-addon/config.yaml | 2 +- haos-addon/src/web/index.html | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/haos-addon/config.yaml b/haos-addon/config.yaml index 3e4c896..e3f0f50 100644 --- a/haos-addon/config.yaml +++ b/haos-addon/config.yaml @@ -1,5 +1,5 @@ name: ShineBridge -version: "1.7.2" +version: "1.7.3" 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 f229be8..db6082e 100644 --- a/haos-addon/src/web/index.html +++ b/haos-addon/src/web/index.html @@ -404,6 +404,7 @@ function renderEnergy(inverters, aggregates, period) { const expOn = gridExport > T; const chOn = batChW > T; const dchOn = batDchW > T; + const batFlowIn = batChW >= batDchW; // true = Laden (Haus→Bat), false = Entladen (Bat→Haus) const evOn = evW > T; const C = { @@ -471,7 +472,7 @@ function renderEnergy(inverters, aggregates, period) { const SEG = [ { id:'ep-pv', d:`M 260,134 C 258,148 262,148 260,162`, col:C.pv, on:pvOn, rev:false }, { id:'ep-grid', d:`M 170,224 C 182,220 186,228 198,224`, col:impOn?C.imp:C.exp, on:impOn||expOn, rev:expOn }, - { id:'ep-bat', d:`M 322,224 C 334,220 338,228 350,224`, col:C.bat, on:chOn||dchOn, rev:dchOn }, + { id:'ep-bat', d:`M 322,224 C 334,220 338,228 350,224`, col:C.bat, on:chOn||dchOn, rev:!batFlowIn }, ...(hasEV ? [{ id:'ep-ev', d:`M 260,286 C 258,300 262,300 260,314`, col:C.ev, on:evOn, rev:false }] : []), ];