From 2dc24eca1b642c726e3df050a020e707ee664627 Mon Sep 17 00:00:00 2001 From: jayjojayson Date: Wed, 4 Mar 2026 01:05:14 +0100 Subject: [PATCH 1/4] v_2.4 --- README.md | 10 +++++----- docs/README-de.md | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 22fb0cb..3d15de5 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ entities: battery_soc: sensor.battery_soc card_mod: style: | - power-flux-card { + :host { {% if states('sensor.solar_power') | float > 0 %} --icon-solar-color: #00ff88; {% else %} @@ -153,7 +153,7 @@ entities: battery_soc: sensor.battery_soc card_mod: style: | - power-flux-card { + :host { {% if states('sensor.grid_power_combined') | float < 0 %} --text-grid-color: #ff3333; {% else %} @@ -173,7 +173,7 @@ entities: battery_soc: sensor.battery_soc card_mod: style: | - power-flux-card { + :host { {% set soc = states('sensor.battery_soc') | float %} {% if soc > 80 %} --neon-green: #00ff88; @@ -197,7 +197,7 @@ entities: consumer_1: sensor.wallbox_power card_mod: style: | - power-flux-card { + :host { {% if states('sensor.wallbox_power') | float > 500 %} --pipe-consumer-1-color: #a855f7; --icon-consumer-1-color: #a855f7; @@ -220,7 +220,7 @@ entities: consumer_1: sensor.wallbox_power card_mod: style: | - power-flux-card { + :host { {% if states('sensor.solar_power') | float == 0 %} --icon-solar-color: #555555; --text-solar-color: #777777; diff --git a/docs/README-de.md b/docs/README-de.md index 6523845..8f75370 100644 --- a/docs/README-de.md +++ b/docs/README-de.md @@ -135,7 +135,7 @@ entities: battery_soc: sensor.battery_soc card_mod: style: | - power-flux-card { + :host { {% if states('sensor.solar_power') | float > 0 %} --icon-solar-color: #00ff88; {% else %} @@ -155,7 +155,7 @@ entities: battery_soc: sensor.battery_soc card_mod: style: | - power-flux-card { + :host { {% if states('sensor.grid_power_combined') | float < 0 %} --text-grid-color: #ff3333; {% else %} @@ -175,7 +175,7 @@ entities: battery_soc: sensor.battery_soc card_mod: style: | - power-flux-card { + :host { {% set soc = states('sensor.battery_soc') | float %} {% if soc > 80 %} --neon-green: #00ff88; @@ -199,7 +199,7 @@ entities: consumer_1: sensor.wallbox_power card_mod: style: | - power-flux-card { + :host { {% if states('sensor.wallbox_power') | float > 500 %} --pipe-consumer-1-color: #a855f7; --icon-consumer-1-color: #a855f7; @@ -222,7 +222,7 @@ entities: consumer_1: sensor.wallbox_power card_mod: style: | - power-flux-card { + :host { {% if states('sensor.solar_power') | float == 0 %} --icon-solar-color: #555555; --text-solar-color: #777777; From 97fd58f671124a57d12fddf94d4ead2e1588aaef Mon Sep 17 00:00:00 2001 From: jayjojayson <2683358+jayjojayson@users.noreply.github.com> Date: Wed, 4 Mar 2026 01:24:16 +0100 Subject: [PATCH 2/4] v_2.4 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3d15de5..1ca85ac 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![Stars](https://img.shields.io/github/stars/jayjojayson/power-flux-card)](https://github.com/jayjojayson/power-flux-card/stargazers) -# Power Flux Card +# Power Flux Card The ⚡ Power Flux Card is an advanced, animated energy flow card for Home Assistant. It visualizes the power distribution between Solar, Grid, Battery, and Consumers with beautiful neon effects and diffrent animations. From 1031af5b3d1731955c3b2c9d21cf05d3cafd96e1 Mon Sep 17 00:00:00 2001 From: jayjojayson <2683358+jayjojayson@users.noreply.github.com> Date: Wed, 4 Mar 2026 13:04:31 +0100 Subject: [PATCH 3/4] v_2.4 --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 24336fc..128e009 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1,3 @@ --- +ko_fi: jayjojayson custom: ["https://www.paypal.me/quadFlyerFW"] From f19730ff1da1e8c8815e8df6d04bfd6361369831 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 10 Mar 2026 10:27:27 +0100 Subject: [PATCH 4/4] Fix: Secondary sensor display - Wh/EUR precision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Separate Wh from W in getSecondaryVal: Wh values >= 1000 now display as kWh (e.g., 794 Wh -> 0.79 kWh) - EUR/ct/€ units now show 2 decimal places (0.28 EUR/kWh instead of 0.3) - W values continue using _formatPower() as before Co-Authored-By: Claude Opus 4.6 --- dist/power-flux-card.js | 8 +------- src/power-flux-card.js | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/dist/power-flux-card.js b/dist/power-flux-card.js index d65ef37..2400503 100644 --- a/dist/power-flux-card.js +++ b/dist/power-flux-card.js @@ -1820,13 +1820,7 @@ console.log( const val = parseFloat(state.state); if (isNaN(val)) return state.state + (state.attributes.unit_of_measurement ? ' ' + state.attributes.unit_of_measurement : ''); const unit = state.attributes.unit_of_measurement || ''; - if (unit === 'W' || unit === 'Wh') { - return this._formatPower(val); - } - if (unit === 'kWh' || unit === 'kW') { - return val.toFixed(1) + ' ' + unit; - } - return val.toFixed(1) + (unit ? ' ' + unit : ''); + if (unit === 'W') { return this._formatPower(val); } if (unit === 'Wh') { if (Math.abs(val) >= 1000) return (val / 1000).toFixed(2) + ' kWh'; return Math.round(val) + ' Wh'; } if (unit === 'kWh' || unit === 'kW') { return val.toFixed(1) + ' ' + unit; } if (unit.includes('EUR') || unit.includes('ct') || unit.includes('€')) { return val.toFixed(2) + ' ' + unit; } return val.toFixed(1) + (unit ? ' ' + unit : ''); }; // Determine existence of main entities diff --git a/src/power-flux-card.js b/src/power-flux-card.js index 4db2e67..842366d 100644 --- a/src/power-flux-card.js +++ b/src/power-flux-card.js @@ -820,13 +820,7 @@ console.log( const val = parseFloat(state.state); if (isNaN(val)) return state.state + (state.attributes.unit_of_measurement ? ' ' + state.attributes.unit_of_measurement : ''); const unit = state.attributes.unit_of_measurement || ''; - if (unit === 'W' || unit === 'Wh') { - return this._formatPower(val); - } - if (unit === 'kWh' || unit === 'kW') { - return val.toFixed(1) + ' ' + unit; - } - return val.toFixed(1) + (unit ? ' ' + unit : ''); + if (unit === 'W') { return this._formatPower(val); } if (unit === 'Wh') { if (Math.abs(val) >= 1000) return (val / 1000).toFixed(2) + ' kWh'; return Math.round(val) + ' Wh'; } if (unit === 'kWh' || unit === 'kW') { return val.toFixed(1) + ' ' + unit; } if (unit.includes('EUR') || unit.includes('ct') || unit.includes('€')) { return val.toFixed(2) + ' ' + unit; } return val.toFixed(1) + (unit ? ' ' + unit : ''); }; // Determine existence of main entities