diff --git a/docs/configuration.md b/docs/configuration.md
index cf0a2a98..b2219a46 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -76,7 +76,8 @@ The `invert_power` attribute can be used to reverse direction if needed by your
| show_absolute: | Optional | `false` | set to `true` to display power and current as absolute values.
| auto_scale: | Optional | `true` | If set to `true` the card will use the entities `unit_of_measurement` attribute to perform the correct scaling (i,e, power values greater than 999W will be displayed as kW e.g. 1.23kW) and display the correct unit. The number of decimal places can be changed using the `decimal_places` card attribute apart from the daily energy values which are set using the `decimal_places_energy` attribute. |
| hide_soc: | Optional | `false` | If set to `true` the current program capacity (soc), or for Goodwe inverters the shutdown soc and offgrid shutdown soc that is shown to the left of the current battery one SOC will be hidden. |
-| show_remaining_energy: | Optional | `true` | Set to `true` to display the remaining battery one energy in kWh based on the current SOC. Only visable on the `lite` and `full` cards. |
+| show_remaining_energy: | Optional | `true` | Set to `true` to display the remaining battery one energy in kWh based on the current SOC. |
+| remaining_energy_to_shutdown: | Optional | `false` | If set to `true` the displayed remaining battery energy will be the available energy to the shutdown SOC and not to 0%. |
| navigate: | Optional | | Sets the navigation path when clicking on the battery one image. Can be used to link to other dashboards and views e.g. `/lovelace/1`.
| invert_flow: | Optional | `false` | Inverts the animated flow. Expects a positive number for battery charging and a negative number for battery discharging
@@ -96,7 +97,8 @@ The `invert_power` attribute can be used to reverse direction if needed by your
| show_absolute: | Optional | `false` | set to `true` to display power and current as absolute values.
| auto_scale: | Optional | `true` | If set to `true` the card will use the entities `unit_of_measurement` attribute to perform the correct scaling (i,e, power values greater than 999W will be displayed as kW e.g. 1.23kW) and display the correct unit. The number of decimal places can be changed using the `decimal_places` card attribute apart from the daily energy values which are set using the `decimal_places_energy` attribute. |
| hide_soc: | Optional | `false` | If set to `true` the current program capacity (soc), or for Goodwe inverters the shutdown soc and offgrid shutdown soc that is shown to the left of the current battery SOC will be hidden. |
-| show_remaining_energy: | Optional | `true` | Set to `true` to display the remaining battery two energy in kWh based on the current SOC. Only visable on the `lite` and `full` cards. |
+| show_remaining_energy: | Optional | `true` | Set to `true` to display the remaining battery two energy in kWh based on the current SOC. |
+| remaining_energy_to_shutdown: | Optional | `false` | If set to `true` the displayed remaining battery energy will be the available energy to the shutdown SOC and not to 0%. |
| navigate: | Optional | | Sets the navigation path when clicking on the battery two image. Can be used to link to other dashboards and views e.g. `/lovelace/1`.
| invert_flow: | Optional | `false` | Inverts the animated flow. Expects a positive number for battery two charging and a negative number for battery two discharging
@@ -131,7 +133,8 @@ These attributes are only needed if `show_solar` is set to `true`.
| Attribute | Requirement | Default | Description |
|--------------------|-------------|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| colour: | Optional | `'#5fb6ad'` | Setss the colour of all the load card objects. Hex codes (`'#66ff00'` etc) or names (`red`, `green`, `blue` etc). |
+| colour: | Optional | `'#5fb6ad'` | Sets the colour of all the load card objects. Hex codes (`'#66ff00'` etc) or names (`red`, `green`, `blue` etc). |
+| off_colour: | Optional | `grey` | Sets the off colour for the additional essential loads. Set this to `transparent` to hide the load when power is below the `off_threshold` |
| dynamic_colour: | Optional | `true` | The essential icon colour will change based on the % contribution of the power source (battery, grid, solar) supplying the load. Set to `false` to disable. |
| dynamic_icon: | Optional | `true` | The essential icon will change when there is 100% contribution from a single power source (battery, grid, solar). Set to `false` to disable. |
| invert_load: | Optional | `false` | Set to `true` if your sensor provides a negative number when the load is drawing power. |
diff --git a/package.json b/package.json
index 35d1a81c..fc8d1e40 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "sunsynk-power-flow-card",
- "version": "6.1.7",
+ "version": "6.2.0",
"description": "A customizable Home Assistant card to emulate the Sunsynk System flow that's displayed on the Inverter screen.",
"main": "sunsynk-power-flow-card.js",
"scripts": {
diff --git a/src/cards/compact-card.ts b/src/cards/compact-card.ts
index 094c5567..f8164925 100644
--- a/src/cards/compact-card.ts
+++ b/src/cards/compact-card.ts
@@ -560,8 +560,10 @@ export const compactCard = (config: sunsynkPowerFlowCardConfig, inverterImg: str
class="${!config.entities?.battery_status && !data.compactMode ? 'st3' : 'st3 left-align'}"
display="${!config.battery.show_remaining_energy || (data.compactMode && data.batteryCount === 2) ? 'none' : ''}"
fill="${data.batteryColour}">
- ${Utils.toNum((data.batteryEnergy * (data.stateBatterySoc.toNum(2) / 100) / 1000), 2)}
- ${UnitOfEnergy.KILO_WATT_HOUR}
+ ${!config.battery.remaining_energy_to_shutdown
+ ? `${Utils.toNum((data.batteryEnergy * (data.stateBatterySoc.toNum() / 100) / 1000), 2)} ${UnitOfEnergy.KILO_WATT_HOUR}`
+ : `${Utils.toNum((data.batteryEnergy * ((data.stateBatterySoc?.toNum() - data.batteryOneShutdown) / 100) / 1000), 2)} ${UnitOfEnergy.KILO_WATT_HOUR}`
+ }
- ${Utils.toNum((data.batteryEnergy * (data.stateBatterySoc.toNum(2) / 100) / 1000), 2)}
- ${UnitOfEnergy.KILO_WATT_HOUR}
+ ${!config.battery.remaining_energy_to_shutdown
+ ? `${Utils.toNum((data.batteryEnergy * (data.stateBatterySoc.toNum() / 100) / 1000), 2)} ${UnitOfEnergy.KILO_WATT_HOUR}`
+ : `${Utils.toNum((data.batteryEnergy * ((data.stateBatterySoc?.toNum() - data.batteryOneShutdown) / 100) / 1000), 2)} ${UnitOfEnergy.KILO_WATT_HOUR}`
+ }
${config.load?.navigate
? svg`
diff --git a/src/cards/full-card.ts b/src/cards/full-card.ts
index 3ff0bfdb..4a60f1df 100644
--- a/src/cards/full-card.ts
+++ b/src/cards/full-card.ts
@@ -658,8 +658,10 @@ export const fullCard = (config: sunsynkPowerFlowCardConfig, inverterImg: string
- ${Utils.toNum((data.batteryEnergy * (data.stateBatterySoc?.toNum() / 100) / 1000), 2)}
- ${UnitOfEnergy.KILO_WATT_HOUR}
+ ${!config.battery.remaining_energy_to_shutdown
+ ? `${Utils.toNum((data.batteryEnergy * (data.stateBatterySoc.toNum() / 100) / 1000), 2)} ${UnitOfEnergy.KILO_WATT_HOUR}`
+ : `${Utils.toNum((data.batteryEnergy * ((data.stateBatterySoc?.toNum() - data.batteryOneShutdown) / 100) / 1000), 2)} ${UnitOfEnergy.KILO_WATT_HOUR}`
+ }