Skip to content

Commit

Permalink
feat: Specify threshold when load/pv is considered off. closes #462
Browse files Browse the repository at this point in the history
feat: Specify threshold to apply dynamic colour to the battery and load path elements. closes #458
fix: logic when applying dynamic colour to the path element.
  • Loading branch information
slipx06 committed May 29, 2024
1 parent 2ff0431 commit 63ccf28
Show file tree
Hide file tree
Showing 22 changed files with 297 additions and 165 deletions.
35 changes: 8 additions & 27 deletions dist/sunsynk-power-flow-card.js

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ The `invert_power` attribute can be used to reverse direction if needed by your
| 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 energy in kWh based on the current SOC. Only visable on the `lite` and `full` cards |
| path_threshold: | Optional | `100` | Specify threshold to apply dynamic colour to the battery path element. The colour of the path will change to the source colour if the percentage supply by a single source equals or exceeds this value

### Solar

Expand All @@ -92,6 +93,7 @@ These attributes are only needed if `show_solar` is set to `true`
| pv4_max_power: | Optional | | Maximum power of MPPT4 based on the number and size of panels. Used to calculate solar efficiency of the string (W). Numeric value or sensor
| 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
| efficiency: | Optional | `0` | `0` - Disabled, `1` - Graphic display, `2` - Text display, `3` - Graphic and text display.
| off_threshold: | Optional | `10` | When total PV power falls belows this threshold colour will change to grey. Requires `dynamic_colour` to be enabled

### Load

Expand Down Expand Up @@ -130,6 +132,8 @@ These attributes are only needed if `show_solar` is set to `true`
| load3_icon: | Optional | none | Set the essential load 3 image using any mdi icon e.g. `mdi:ev-station` Presets are not available when showing 4 essential loads. You can also provide a sensor that returns the mdi icon. |
| load4_icon: | Optional | none | Set the essential load 4 image using any mdi icon e.g. `mdi:ev-station` Presets are not available when showing 4 essential loads. You can also provide a sensor that returns the mdi icon. |
| 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 |
| off_threshold: | Optional | `0` | When power falls below this value the load will be considered off and colour will change to grey. Requires `dynamic_colour` to be enabled. Can also be set to `-1` to disable. |
| path_threshold: | Optional | `100` | Specify threshold to apply dynamic colour to the load path element. The colour of the path will change to the source colour if the percentage supply by a single source equals or exceeds this value

### Grid

Expand Down Expand Up @@ -157,7 +161,8 @@ These attributes are only needed if `show_solar` is set to `true`
| animation_speed: | Optional | `8` | Set slowest animation speed in seconds, depending on power draw |
| max_power: | Optional | `8000` | Maximum power draw to calculate animation speed. Numeric value or sensor |
| 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 |
| energy_cost_decimals: | Optional | `2` | Sets the number of decimal places to display the buy and sell energy costs
| energy_cost_decimals: | Optional | `2` | Sets the number of decimal places to display the buy and sell energy costs |
| off_threshold: | Optional | `0` | When power falls below this value the load will be considered off and colour will change to grey. Requires `dynamic_colour` to be enabled. Can also be set to `-1` to disable. |

### Entities

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sunsynk-power-flow-card",
"version": "4.39.1",
"version": "4.40.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": {
Expand Down
Loading

0 comments on commit 63ccf28

Please sign in to comment.