---
myst:
enable_extensions: [ "colon_fence" ]
---
# Configuration
The card can be configured through the following attributes:
| Attribute | Requirement | Default | Description |
|-----------------|--------------|-----------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| type: | **Required** | `custom:sunsynk-power-flow-card` | The custom card. |
| cardstyle: | **Required** | `lite` | Selects the card layout that is used `compact`, `lite` or `full`. |
| large_font: | Optional | `false` | Increases font size of sensor data. |
| wide: | Optional | `false` | Display the card content for wide screen format (16:9). |
| title: | Optional | | Set the card title i.e. Inverter One. |
| title_colour: | Optional | | Sets the colour of the card title. (`red`, `green`, `blue` etc). |
| title_size: | Optional | `32px` | Set the font size for the card title i.e. `16px`, `24px`. |
| show_solar: | Optional | `true` | Toggle display of solar information. |
| show_battery: | Optional | `true` | Toggle display of battery information. |
| show_grid: | Optional | `true` | Toggle display of grid information. |
| card_height: | Optional | `100%` | Sets the card height in pixels. Specify the value i.e. `400px` or provide a sensor i.e. `input.number_height`. |
| card_width: | Optional | `100%` | Sets the card width in percentage. Specify the value i.e. `80%` or provide a sensor i.e. `input.number_width`. |
| decimal_places: | Optional | `2` | Sets the number of decimal places to display when using the `auto_scale` option. |
| decimal_places_energy: | Optional | `1` | Sets the number of decimal places to display for the daily energy values. |
| dynamic_line_width: | Optional | `false` | Adjusts the width of the lines and animated dot based on the ratio of current power to `max_power` (defined in each section below). Requires `max_power` to be explicitly defined. |
| max_line_width: | Optional | `4` | Sets the maximum line width when `dynamic_line_width: true`. If you prefer thick lines set a larger value. Reduce this value for a more subtle scaling affect. Values greater the `8` are ignored. |
| min_line_width: | Optional | `1` | Sets the minimum or default line width on the card. Values greater the `8` are ignored. |
| inverter: | Optional | See optional [Inverter](#inverter) attributes below | List of inverter attributes. |
| battery: | Optional | See required [Battery](#battery) attributes below | List of battery attributes. Required if `show_battery: true`. |
| solar: | Optional | See optional [Solar](#solar) attributes below | List of solar attributes. |
| load: | Optional | See optional [Load](#load) attributes below | List of load attributes. |
| grid: | Optional | See optional [Grid](#grid) attributes below | List of grid attributes. |
| entities: | **Required** | See required [Entities](#entities) attributes below | List of sensor entities. |
### Inverter
| Attribute | Requirement | Default | Description |
|--------------|-------------|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| modern: | Optional | `true` | Display the inverter using the modern image. Set to `false` to display an image of the inverter based on the `model` attribute below. |
| colour: | Optional | `grey` | Sets the colour of the inverter and data. Hex codes (`'#66ff00'` etc) or names (`red`, `green`, `blue` etc). |
| navigate: | Optional | | Sets the navigation path when clicking on the inverter image. Can be used to link to other dashboards and views e.g. `/lovelace/1`. |
| autarky: | Optional | `power` | Display autarky and ratio as a percentage using either realtime power or daily energy values. Set to `no` to hide (`energy/power/no`).
Autarky is the percentage of self sufficiency through Home Production. Ratio is the percentage of produced electricity used by the home.
It is calculated based on the formula below and borrowed from the [Power Distribution Card](https://github.com/JonahKr/power-distribution-card)
- Autarky in Percent = Home Production / Home Consumption
- Ratio in Percent = Home Consumption / Home Production
Home Production = Solar + Battery (discharge) + Aux (in), Home Consumption = Essential power + Nonessential power + Aux (out) + Battery (charge) |
| model: | Optional | `sunsynk` | Selects which inverter image and status codes to use. Options are `lux`, `solis`, `goodwe`, `goodwe_gridmode`, `foxess`, `solax`, `sunsynk`, `victron`, `fronius`, `solaredge`, `growatt`, `sofar`, `ces-battery-box`, `deye`, `azzurro`, `powmr`, `mppsolar`, `smasolar` and `huawei`. |
| 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. |
| three_phase: | Optional | `false` | If set to `true` additional 3 phase sensors will be displayed. Requires entity attributes to be defined i.e. `inverter_current_L2`, `inverter_current_L3`, `inverter_voltage_L2`, `inverter_voltage_L3` , `grid_ct_power_L2`, `grid_ct_power_L3`, `load_power_L1`, `load_power_L2`, `load_power_L3`.
### Battery
To display battery power and current as absolute values set `show_absolute: true`. This is set to false by default and
will return your sensor value. The animated dot will change direction depending on the charging or discharging state.
The `invert_power` attribute can be used to reverse direction if needed by your sensor.
| Attribute | Requirement | Default | Description |
|------------------|--------------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| count: | Optional | `1` | Set the number of batteries to be disaplyed. Two batteries can only be displayed when `wide: true`.
| show_daily: | Optional | `false` | Toggles the daily total. If `count: 2` this should be the combined daily total value. |
| animation_speed: | Optional | `6` | Set slowest animation speed in seconds, depending on power draw. |
| max_power: | Optional | `4500` | Maximum power draw to calculate animation speed. Numeric value or sensor i.e. `number.battery_maximum_discharging_power`. |
| 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. |
#### Battery One
| Attribute | Requirement | Default | Description |
|------------------|--------------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| energy: | **Required** | `0` | Total battery one energy in Wh (e.g. 3 x 5.32kWh = 15960). If set to `0` the remaining battery one runtime will be hidden. Numeric value or sensor i.e. `sensor.sunsynk_battery_energy`. |
| shutdown_soc: | **Required** | `20` | Battery one shutdown percentage used to calculate remaining runtime. Numeric value or sensor i.e. `sensor.sunsynk_battery_capacity_shutdown`. |
| shutdown_soc_offgrid: | Optional | | The offgrid battery one shutdown percentage used to calculate remaining runtime. Numeric value or sensor i.e. `sensor.offgrid_battery_capacity_shutdown`. |
| soc_end_of_charge: | Optional | `100` | Set the charge cut-off capacity. The minimum value is `50`. The maximum value is `100`. Numeric value or sensor i.e. `sensor.soc_end_of_charge`. |
| soc_decimal_places: | Optional | | Set the number of decimal places shown for the battery SOC. This setting is only applied if `hide_soc: true` due to layout constraints. |
| invert_power: | Optional | `false` | Set to `true` if your sensor provides a positive number for battery charge and negative number for battery discharge. See also `invert_flow:` below. |
| colour: | Optional | `pink` | Sets the colour of all the battery one card objects. Hex codes (`'#66ff00'` etc) or names (`red`, `green`, `blue` etc). |
| charge_colour: | Optional | | Sets the colour of all the battery one card objects when charging. Hex codes (`'#66ff00'` etc) or names (`red`, `green`, `blue` etc). |
| dynamic_colour: | Optional | `true` | The battery one icon colour will change based on the % contribution of the power source (grid, solar) supplying the battery. Set to `false` to disable. If `priority_load_243: on` solar will prioritise the essential load. If `false` or ommited solar will prioritise the battery. |
| linear_gradient: | Optional | `true` | The blocks inside the battery one icon that represent SOC will be coloured using a linear gradient that ranges from red to green. |
| animate: | Optional | `true` | Animates the linear gradient inside the battery one icon |
| 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 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. |
| 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
#### Battery Two
| Attribute | Requirement | Default | Description |
|------------------|--------------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| energy: | **Required** | `0` | Total battery two energy in Wh (e.g. 3 x 5.32kWh = 15960). If set to `0` the remaining battery two runtime will be hidden. Numeric value or sensor i.e. `sensor.sunsynk_battery_energy`. |
| shutdown_soc: | **Required** | `20` | Battery two shutdown percentage used to calculate remaining runtime. Numeric value or sensor i.e. `sensor.sunsynk_battery_capacity_shutdown`. |
| shutdown_soc_offgrid: | Optional | | The offgrid battery two shutdown percentage used to calculate remaining runtime. Numeric value or sensor i.e. `sensor.offgrid_battery_capacity_shutdown`. |
| soc_end_of_charge: | Optional | `100` | Set the charge cut-off capacity. The minimum value is `50`. The maximum value is `100`. Numeric value or sensor i.e. `sensor.soc_end_of_charge`. |
| soc_decimal_places: | Optional | | Set the number of decimal places shown for the battery SOC. This setting is only applied if `hide_soc: true` due to layout constraints. |
| invert_power: | Optional | `false` | Set to `true` if your sensor provides a positive number for battery two charge and negative number for battery two discharge. See also `invert_flow:` below. |
| colour: | Optional | `pink` | Sets the colour of all the battery two card objects. Hex codes (`'#66ff00'` etc) or names (`red`, `green`, `blue` etc). |
| charge_colour: | Optional | | Sets the colour of all the battery two card objects when charging. Hex codes (`'#66ff00'` etc) or names (`red`, `green`, `blue` etc). |
| dynamic_colour: | Optional | `true` | The battery two icon colour will change based on the % contribution of the power source (grid, solar) supplying the battery. Set to `false` to disable. If `priority_load_243: on` solar will prioritise the essential load. If `false` or ommited solar will prioritise the battery. |
| linear_gradient: | Optional | `true` | The blocks inside the battery two icon that represent SOC will be coloured using a linear gradient that ranges from red to green. |
| animate: | Optional | `true` | Animates the linear gradient inside the battery two icon |
| 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 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. |
| 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
### Solar
These attributes are only needed if `show_solar` is set to `true`.
| Attribute | Requirement | Default | Description |
|------------------|--------------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| colour: | Optional | `orange`| Sets the colour of all the solar card objects. Hex codes (`'#66ff00'` etc) or names (`red`, `green`, `blue` etc).
| show_daily: | Optional | `false` | Toggles the daily total.
| display_mode: | Optional | `1` | `1` - Only display the daily total, `2` - Display the daily total and remaining daily forecast, `3` - Display the daily total and total solar generation.
| dynamic_colour: | Optional | `true` | The solar elements on the card will be greyed out if total solar power < 10W.
| mppts: | **Required** | `2` | Specify the number of MPPT's in use `1-6`. Use the `wide` view to display more than four MPPT's on the compact or lite cards.
| animation_speed: | Optional | `9` | Set slowest animation speed in seconds, depending on Power produced.
| max_power: | Optional | `8000` | Maximum power draw to calculate animation speed. This value is also used to calculate the solar efficiency for the total PV power and should equal the total size of your PV array. Numeric value or sensor.
| pv1_name: | Optional | `PV1` | Set the disaply name for MPPT1.
| pv1_max_power: | Optional | | Maximum power of MPPT1 based on the number and size of panels. Used to calculate solar efficiency of the string (W). Numeric value or sensor.
| pv2_name: | Optional | `PV2` | Set the disaply name for MPPT2.
| pv2_max_power: | Optional | | Maximum power of MPPT2 based on the number and size of panels. Used to calculate solar efficiency of the string (W). Numeric value or sensor.
| pv3_name: | Optional | `PV3` | Set the disaply name for MPPT3.
| pv3_max_power: | Optional | | Maximum power of MPPT3 based on the number and size of panels. Used to calculate solar efficiency of the string (W). Numeric value or sensor.
| pv4_name: | Optional | `PV4` | Set the disaply name for MPPT4.
| 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.
| pv5_name: | Optional | `PV5` | Set the disaply name for MPPT5.
| pv5_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.
| pv6_name: | Optional | `PV6` | Set the disaply name for MPPT6.
| pv6_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.
| navigate: | Optional | | Sets the navigation path when clicking on the sun image. Can be used to link to other dashboards and views e.g. `/lovelace/1`.
| invert_flow: | Optional | `false` | Inverts the animated flow.
| custom_label: | Optional | | Set a custom label that overides the default `Daily Solar`, `Daily Solar / Left Today` and `Daily Solar / Total Solar` lablels.
### Load
| Attribute | Requirement | Default | Description |
|--------------------|-------------|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 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` |
| max_colour: | Optional | | Sets the upper threshold colour for the additional essential loads. |
| 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. |
| show_daily: | Optional | `false` | Toggles the daily total. |
| show_daily_aux: | Optional | `false` | Toggles the daily AUX total. Only displayed if `show_aux` is set to `true`. |
| show_aux: | Optional | `false` | Toggles the display of AUX. |
| invert_aux: | Optional | `false` | Set to `true` if your sensor provides a positive number for AUX input and negative number for AUX output. |
| show_absolute_aux: | Optional | `false` | set to `true` to display power as an absolute value.
| 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. |
| aux_name: | Optional | `Auxilary` | Set the display name for the AUX Load.
| aux_daily_name: | Optional | `DAILY AUX` | Set the display name for the DAILY AUX label.
| aux_type: | Optional | `default` | Sets the AUX image using preset or any mdi icon e.g. `mdi:ev-station`. Presets are: `gen`, `inverter` `default`, `oven`, `pump`, `aircon` and `boiler`.
| aux_colour: | Optional | `the load colour` | Sets the colour of all the AUX card objects. Hex codes (`'#66ff00'` etc) or names (`red`, `green`, `blue` etc). |
| aux_dynamic_colour:| Optional | `true` | The respective aux elements on the card will be greyed out if aux power = 0W. |
| aux_off_colour: | Optional | `the load colour` | Sets the colour of the AUX icon and label when disconnected. Hex codes (`'#66ff00'` etc) or names (`red`, `green`, `blue` etc). |
| aux_loads: | Optional | `0` | Display additional loads on the AUX side (`0/1/2`).
| aux_load1_name: | Optional | | Set the display name for the AUX load 1.
| aux_load2_name: | Optional | | Set the display name for the AUX load 2.
| aux_load1_icon: | Optional | | Set the AUX load 1 image using any mdi icon e.g. `mdi:ev-station`. You can also provide a sensor that returns the mdi icon.
| aux_load2_icon: | Optional | | Set the AUX load 2 image using any mdi icon e.g. `mdi:ev-station`. You can also provide a sensor that returns the mdi icon.
| essential_name: | Optional | `Essential` | Set the display name for the essential load.
| additional_loads: | Optional | `0` | Display additional loads on the essential side (`0/1/2/3/4/5/6`). Three loads will only be visable when using the lite and compact card. Four or more loads are only visable on the full card if `show_aux: false`.
| load1_name: | Optional | | Set the display name for the essential load 1.
| load1_icon: | Optional | none | Set the essential load 1 image using preset or any mdi icon e.g. `mdi:ev-station` Presets are: `boiler`, `pump`, `aircon`, `oven`. You can also provide a sensor that returns the mdi icon. |
| load1_switch: | Optional | | Provide an entity that can be toggled when clicking on the essential load 1 icon.
| load1_max_threshold: | Optional | | Set the threshold for the essential load 1 that will activate the `max_colour`.
| load2_name: | Optional | | Set the display name for the essential load 2.
| load2_icon: | Optional | none | Set the essential load 2 image using preset or any mdi icon e.g. `mdi:ev-station` Presets are: `boiler`, `pump`, `aircon`, `oven`. You can also provide a sensor that returns the mdi icon. |
| load2_switch: | Optional | | Provide an entity that can be toggled when clicking on the essential load 2 icon.
| load2_max_threshold: | Optional | | Set the threshold for the essential load 2 that will activate the `max_colour`.
| load3_name: | Optional | | Set the display name for the essential load 3 (Lite/compact card only).
| 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 or more essential loads. You can also provide a sensor that returns the mdi icon. |
| load3_switch: | Optional | | Provide an entity that can be toggled when clicking on the essential load 3 icon.
| load3_max_threshold: | Optional | | Set the threshold for the essential load 3 that will activate the `max_colour`.
| load4_name: | Optional | | Set the display name for the essential load 4.
| 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 or more essential loads. You can also provide a sensor that returns the mdi icon. |
| load4_switch: | Optional | | Provide an entity that can be toggled when clicking on the essential load 4 icon.
| load4_max_threshold: | Optional | | Set the threshold for the essential load 4 that will activate the `max_colour`.
| load5_name: | Optional | | Set the display name for the essential load 5.
| load5_icon: | Optional | none | Set the essential load 5 image using any mdi icon e.g. `mdi:ev-station` Presets are not available when showing 4 or more essential loads. You can also provide a sensor that returns the mdi icon. |
| load5_switch: | Optional | | Provide an entity that can be toggled when clicking on the essential load 5 icon.
| load5_max_threshold: | Optional | | Set the threshold for the essential load 5 that will activate the `max_colour`.
| load6_name: | Optional | | Set the display name for the essential load 6.
| load6_icon: | Optional | none | Set the essential load 6 image using any mdi icon e.g. `mdi:ev-station` Presets are not available when showing 4 or more essential loads. You can also provide a sensor that returns the mdi icon. |
| load6_switch: | Optional | | Provide an entity that can be toggled when clicking on the essential load 6 icon.
| load6_max_threshold: | Optional | | Set the threshold for the essential load 6 that will activate the `max_colour`.
| 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.
| navigate: | Optional | | Sets the navigation path when clicking on the essential load image. Can be used to link to other dashboards and views e.g. `/lovelace/1`.
| invert_flow: | Optional | `false` | Inverts the animated flow.
| label_daily_load: | Optional | | Set custom text for the "DAILY LOAD" label that is displayed.
### Grid
| Attribute | Requirement | Default | Description |
|-----------------------|-------------|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| colour: | Optional | `'#5490c2'` | Sets the colour of all the grid card objects. Hex codes (`'#66ff00'` etc) or names (`red`, `green`, `blue` etc). |
| grid_name: | Optional | | Set the display name for the grid. |
| export_colour: | Optional | | Sets the colour of all the grid card objects when exporting (selling) energy. Hex codes (`'#66ff00'` etc) or names (`red`, `green`, `blue` etc). If not set will use the `colour:` value defined above. |
| no_grid_colour: | Optional | | Sets the colour of all the grid card objects when there is no grid power. Hex codes (`'#66ff00'` etc) or names (`red`, `green`, `blue` etc). If not set will use the `colour:` value defined above total. |
| grid_off_colour: | Optional | | Sets the colour of the grid icon when the grid is disconnected. | |
| show_daily_buy: | Optional | `false` | Toggles the daily buy total. |
| show_daily_sell: | Optional | `false` | Toggles the daily sell total. |
| show_nonessential: | Optional | `true` | Toggles the display of non-essential. |
| nonessential_icon: | Optional | `default` | Change the non-essential image using presets or any mdi icon e.g. `mdi:ev-station`. Presets are:
`default`
`oven`,
`boiler`
`pump`,
`aircon` |
| nonessential_name: | Optional | `Non Essential` | Set the display name for the non-essential load.
| additional_loads: | Optional | `0` | Toggle the display of additional loads on the non-essential side (`0/1/2/3`) The third load will only be displayed if the inverter timer schedules are not used or wide screen is selected due to limited space. Set the battery attribute `hide_soc: true` or `wide: true` to display the third additional load.
| load1_name: | Optional | | Set the display name for the non-essential load 1.
| load2_name: | Optional | | Set the display name for the non-essential load 2.
| load3_name: | Optional | | Set the display name for the non-essential load 3.
| load1_icon: | Optional | `default` | Change the non-essential load 1 image using presets or any mdi icon e.g. `mdi:ev-station`. Presets are: `default`, `oven`, `boiler`, `pump`, `aircon` You can also provide a sensor that returns the mdi icon. |
| load2_icon: | Optional | `default` | Change the non-essential load 2 image using presets or any mdi icon e.g. `mdi:ev-station`. Presets are: `default`, `oven`, `boiler`, `pump`, `aircon` You can also provide a sensor that returns the mdi icon. |
| load3_icon: | Optional | none | Change the non-essential load 3 image using any mdi icon e.g. `mdi:ev-station`. You can also provide a sensor that returns the mdi icon. |
| invert_grid: | Optional | `false` | Set to `true` if your sensor provides a negative number for grid import and positive number for grid export. |
| show_absolute: | Optional | `false` | set to `true` to display power as absolute
| 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. |
| 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. |
| import_icon: | Optional | | Set the grid connected/import image using any mdi icon e.g. `mdi:transmission-tower-import`. You can also provide a sensor that returns the mdi icon. If defined overrides the card default icon. |
| export_icon: | Optional | | Set the grid export image using any mdi icon e.g. `mdi:transmission-tower-export`. You can also provide a sensor that returns the mdi icon. If defined overrides the card default icon. |
| disconnected_icon: | Optional | | Set the grid disconnected image using any mdi icon e.g. `mdi:transmission-tower-off`. You can also provide a sensor that returns the mdi icon. If defined overrides the card default icon. |
| label_daily_grid_buy: | Optional | | Set custom text for the "DAILY GRID BUY" label that is displayed. |
| label_daily_grid_sell: | Optional | | Set custom test for the "DAILY GRID SELL" label that is displayed. |
| navigate: | Optional | | Sets the navigation path when clicking on the grid image. Can be used to link to other dashboards and views e.g. `/lovelace/1. |
| invert_flow: | Optional | `false` | Inverts the animated flow.
### Entities
Entity attributes below have been appended with the modbus register # e.g. `pv2_power_187` to indicate which Sunsynk
register should be read when configuring your sensors. Replace the default sensors with your own specific sensor names.
It is important that your sensors read the expected modbus register value. If you have missing sensors for any attribute
set it to none i.e. `day_pv_energy_108: none`. This will hide the sensor data from the card. To display a placeholder
with a default value of 0 set it to `zero` or any other value i.e. `solarday_108: zero`.
See the [WIKI](https://github.com/slipx06/sunsynk-power-flow-card/wiki/Sensor-Mappings) for more information on sensor
mappings if using other integration methods.
#### Solar Entities
| Attribute | Requirement | Default | Description |
|----------------------------|--------------|------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| day_pv_energy_108: | Optional | `sensor.sunsynk_day_pv_energy` | Daily solar usage (kWh). |
| pv1_power_186: | Optional | `sensor.sunsynk_pv1_power` | PV string 1 power (W). |
| pv2_power_187: | Optional | `sensor.sunsynk_pv2_power` | PV string 2 power (W). |
| pv3_power_188: | Optional | `sensor.sunsynk_pv3_power` | PV string 3 power (W). |
| pv4_power_189: | Optional | `sensor.sunsynk_pv4_power` | PV string 4 power (W). |
| pv5_power: | Optional | `sensor.sunsynk_pv5_power` | PV string 5 power (W). |
| pv6_power: | Optional | `sensor.sunsynk_pv6_power` | PV string 6 power (W). |
| pv_total: | Optional | `none` | Provide a sensor for total pv power. If omitted the card uses internal logic to calculate this based on the pv1-4 power (W).
| pv1_voltage_109: | Optional | `sensor.sunsynk_pv1_voltage` | PV string 1 voltage (V). |
| pv1_current_110: | Optional | `sensor.sunsynk_pv1_current` | PV string 1 current (A). |
| pv2_voltage_111: | Optional | `sensor.sunsynk_pv2_voltage` | PV string 2 voltage (V). |
| pv2_current_112: | Optional | `sensor.sunsynk_pv2_current` | PV string 2 current (A). |
| pv3_voltage_113: | Optional | `sensor.sunsynk_pv3_voltage` | PV string 3 voltage (V). |
| pv3_current_114: | Optional | `sensor.sunsynk_pv3_current` | PV string 3 current (A). |
| pv4_voltage_115: | Optional | `sensor.sunsynk_pv4_voltage` | PV string 4 voltage (V). |
| pv4_current_116: | Optional | `sensor.sunsynk_pv4_current` | PV string 4 current (A). |
| pv5_voltage: | Optional | `sensor.sunsynk_pv4_voltage` | PV string 5 voltage (V). |
| pv5_current: | Optional | `sensor.sunsynk_pv4_current` | PV string 5 current (A). |
| pv6_voltage: | Optional | `sensor.sunsynk_pv4_voltage` | PV string 6 voltage (V). |
| pv6_current: | Optional | `sensor.sunsynk_pv4_current` | PV string 6 current (A). |
| remaining_solar: | Optional | `sensor.solcast_forecast_remaining_today` | The remaining solar forecast for the day (kWh). Use with solar `display_mode:2`. |
| total_pv_generation: | Optional | | Total Solar generation (Lifetime or forecast for the day) (kWh). Use with solar `display_mode:3`. |
| solar_sell_247: | Optional | `switch.sunsynk_toggle_solar_sell` | Displays icons to indicate if sell solar is active or not. The switch can be toggled by clicking on the icon (`on/off`, `1/0`).
| environment_temp: | Optional | | Display outside temperature or other environment temperature below the sun icon. |
#### Battery Entities
##### Battery One Entities
| Attribute | Requirement | Default | Description |
|----------------------------|--------------|------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| day_battery_discharge_71: | Optional | `sensor.sunsynk_day_battery_discharge` | Daily battery usage (kWh). If you are displaying two batteries on the card this sensor should be the combined total daily discharge. You may need to create a template sensor. |
| day_battery_charge_70: | Optional | `sensor.sunsynk_day_battery_charge` | Daily battery charge (kWh). If you are displaying two batteries on the card this sensor should be the combined total daily discharge. You may need to create a template sensor. |
| battery_power_190: | **Required** | `sensor.sunsynk_battery_power` | Battery power (W). Expects a negative number for battery charging and a positive number for battery discharging. Set the `invert_power:` battery attribute to `yes` if your sensor reports this the other way around. Alternatively set `invert_flow:` battery attribute to `yes` and provide a positive number for battery charging and a negative number for battery discharging |
| battery_current_191: | **Required** | `sensor.sunsynk_battery_current` | Battery current (A). |
| battery_temp_182: | Optional | `sensor.sunsynk_battery_temperature` | Battery temperature (°). Note do not define this sensor if you want to display battery SOH. See below. |
| battery_voltage_183: | Optional | `sensor.sunsynk_battery_voltage` | Battery voltage (V). |
| battery_soc_184: | **Required** | `sensor.sunsynk_battery_soc` | Battery state of charge (%). |
| battery_soh: | Optional | | Battery State of Health (SOH) (%). You can chose to display either battery temperature or battery SOH but not both. They are displayed in the same place on the card. If `battery_temp_182:` is defined it will take priority and this sensor will not be displayed. |
| battery_rated_capacity: | Optional | | Battery rated capacity (Ah). If provided this sensor will be used to calculate battery energy. The`energy` attribute under the battery card configuration will be ignored.
| battery_current_direction: | Optional | `sensor.solis_battery_current_direction` | Used only when inverter model is set to `solis` (`0`, `1`).
| battery_status: | Optional | `sensor.battery_mode_code` | Used only when inverter model is set to `goodwe`, `goodwe_gridmode` or `huawei`. Battery status `0, 1, 2, 3, 4`. |
##### Battery Two Entities
| Attribute | Requirement | Default | Description |
|----------------------------|--------------|------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| battery2_power_190: | **Required** | `sensor.sunsynk_battery_power` | Battery power (W). Expects a negative number for battery charging and a positive number for battery discharging. Set the `invert_power:` battery attribute to `yes` if your sensor reports this the other way around. Alternatively set `invert_flow:` battery attribute to `yes` and provide a positive number for battery charging and a negative number for battery discharging |
| battery2_current_191: | **Required** | `sensor.sunsynk_battery_current` | Battery current (A). |
| battery2_temp_182: | Optional | `sensor.sunsynk_battery_temperature` | Battery temperature (°). Note do not define this sensor if you want to display battery SOH. See below. |
| battery2_voltage_183: | Optional | `sensor.sunsynk_battery_voltage` | Battery voltage (V). |
| battery2_soc_184: | **Required** | `sensor.sunsynk_battery_soc` | Battery state of charge (%). |
| battery2_soh: | Optional | | Battery State of Health (SOH) (%). You can chose to display either battery temperature or battery SOH but not both. They are displayed in the same place on the card. If `battery_temp_182:` is defined it will take priority and this sensor will not be displayed. |
| battery2_rated_capacity: | Optional | | Battery rated capacity (Ah). If provided this sensor will be used to calculate battery energy. The`energy` attribute under the battery card configuration will be ignored.
| battery2_current_direction: | Optional | `sensor.solis_battery_current_direction` | Used only when inverter model is set to `solis` (`0`, `1`).
| battery2_status: | Optional | `sensor.battery_mode_code` | Used only when inverter model is set to `goodwe`, `goodwe_gridmode` or `huawei`. Battery status `0, 1, 2, 3, 4`. |
#### Inverter Entities
| Attribute | Requirement | Default | Description |
|----------------------------|--------------|------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| inverter_status_59: | Optional | `sensor.sunsynk_overall_state` | Expects a sensor that contains inverter status represented as a string or number. For Sunsynk `0, 1, 2, 3, 4` or `standby, selftest, normal, alarm, fault`. For Lux `0,1,2,4,5,7,8,9,10,11,12,16,17,20,32,40,64,136,192`. For Solis expects a numeric value `0-57`. For Goodwe `0,1,2,3,4,5` or `Wait mode, Normal (On-Grid), Normal (Off-Grid), Fault Mode, Flash Mode, Check Mode`. For Goodwe_gridmode `0,1,2` or `Idle, Exporting, Importing`. |
| use_timer_248: | Optional | `switch.sunsynk_toggle_system_timer` | Displays "Use timer" status as an icon next to the inverter. Set to `no` to hide. |
| priority_load_243: | Optional | `switch.sunsynk_toggle_priority_load` | Shows if energy pattern is set to priority load or priority battery as an icon next to the inverter. Set to `no` to hide. |
| inverter_voltage_154: | Optional | `sensor.sunsynk_inverter_voltage` | Inverter L1 voltage (V). |
| inverter_voltage_L2: | Optional | | Inverter L2 voltage (V). |
| inverter_voltage_L3: | Optional | | Inverter L3 voltage (V). |
| load_frequency_192: | Optional | `sensor.sunsynk_load_frequency` | Load frequency (Hz). |
| inverter_current_164: | Optional | `sensor.sunsynk_inverter_current` | Inverter L1 current (A). |
| inverter_current_L2: | Optional | | Inverter L2 current (A). |
| inverter_current_L3: | Optional | | Inverter L3 current (A). |
| inverter_power_175: | Optional | `sensor.sunsynk_inverter_power` | Inverter power (W). Required if the essential_power attribute is set to `none`. |
| grid_power_169: | Optional | `sensor.sunsynk_grid_power` | Grid power (W) See NOTE below. Use **167** (Grid LD Power) if non-essential and essential readings are wrong. Required if the nonessential_power attribute is set to `none`. |
| radiator_temp_91: | Optional | `sensor.sunsynk_radiator_temperature` | Inverter AC temperature (℃). |
| dc_transformer_temp_90: | Optional | `sensor.sunsynk_dc_transformer_temperature` | Inverter DC temperature (℃). |
| prog1_time: | Optional | `sensor.sunsynk_time_slot_1` | Program 1 start time (`HH:MM`).
| prog1_capacity: | Optional | `number.sunsynk_system_mode_soc_time1` | Program 1 capacity (SOC) setting.
| prog1_charge: | Optional | `switch.sunsynk_system_mode_grid_charge_time1` | Program 1 charge options (`on/off`, `1/0`, `No Grid or Gen`).
| prog2_time: | Optional | `sensor.sunsynk_time_slot_2` | Program 2 start time (`HH:MM`).
| prog2_capacity: | Optional | `number.sunsynk_system_mode_soc_time2` | Program 2 capacity (SOC) setting.
| prog2_charge: | Optional | `switch.sunsynk_system_mode_grid_charge_time2` | Program 2 charge options (`on/off`, `1/0`, `No Grid or Gen`).
| prog3_time: | Optional | `sensor.sunsynk_time_slot_3` | Program 3 start time (`HH:MM`).
| prog3_capacity: | Optional | `number.sunsynk_system_mode_soc_time3` | Program 3 capacity (SOC) setting.
| prog3_charge: | Optional | `switch.sunsynk_system_mode_grid_charge_time3` | Program 3 charge options (`on/off`, `1/0`, `No Grid or Gen`).
| prog4_time: | Optional | `sensor.sunsynk_time_slot_4` | Program 4 start time (`HH:MM`).
| prog4_capacity: | Optional | `number.sunsynk_system_mode_soc_time4` | Program 4 capacity (SOC) setting.
| prog4_charge: | Optional | `switch.sunsynk_system_mode_grid_charge_time4` | Program 4 charge options (`on/off`, `1/0`, `No Grid or Gen`).
| prog5_time: | Optional | `sensor.sunsynk_time_slot_5` | Program 5 start time (`HH:MM`).
| prog5_capacity: | Optional | `number.sunsynk_system_mode_soc_time5` | Program 5 capacity (SOC) setting.
| prog5_charge: | Optional | `switch.sunsynk_system_mode_grid_charge_time5` | Program 5 charge options (`on/off`, `1/0`, `No Grid or Gen`).
| prog6_time: | Optional | `sensor.sunsynk_time_slot_6` | Program 6 start time (`HH:MM`).
| prog6_capacity: | Optional | `number.sunsynk_system_mode_soc_time6` | Program 6 capacity (SOC) setting.
| prog6_charge: | Optional | `switch.sunsynk_system_mode_grid_charge_time6` | Program 6 charge options (`on/off`, `1/0`, `No Grid or Gen`).
#### Load Entities
| Attribute | Requirement | Default | Description |
|----------------------------|--------------|------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| day_load_energy_84: | Optional | `sensor.sunsynk_day_load_energy` | Daily load (kWh). |
| day_aux_energy: | Optional | | Sensor that provides the daily AUX energy (kWh).
| essential_power: | Optional | `none` | The card will automatically calculate this sensor based on the formula below if the attribute is set to `none` or the sensor is not defined. You can overide this by supplying a sensor that measures essential power e.g. `Load power Essential` in the case of Solar Assistant (W). |
| essential_load1: | Optional | | Sensor that contains the power of your essential load 1 (W). Can also be used to display any sensor data i.e. temp, energy etc if `auto_scale: false`. |
| essential_load2: | Optional | | Sensor that contains the power of your essential load 2 (W). Can also be used to display any sensor data i.e. temp, energy etc if `auto_scale: false`. |
| essential_load3: | Optional | | Sensor that contains the power of your essential load 3 (W). Can also be used to display any sensor data i.e. temp, energy etc if `auto_scale: false` For lite and compact cards. |
| essential_load4: | Optional | | Sensor that contains the power of your essential load 4 (W). Can also be used to display any sensor data i.e. temp, energy etc if `auto_scale: false`. |
| essential_load5: | Optional | | Sensor that contains the power of your essential load 5 (W). Can also be used to display any sensor data i.e. temp, energy etc if `auto_scale: false`. |
| essential_load6: | Optional | | Sensor that contains the power of your essential load 6 (W). Can also be used to display any sensor data i.e. temp, energy etc if `auto_scale: false`. |
| essential_load1_extra: | Optional | | Sensor that contains additional information you want displayed for your essential load 1 e.g. Daily kWh, Temperature etc.
| essential_load2_extra: | Optional | | Sensor that contains additional information you want displayed for your essential load 2 e.g. Daily kWh, Temperature etc.
| essential_load3_extra: | Optional | | Sensor that contains additional information you want displayed for your essential load 3 e.g. Daily kWh, Temperature etc.
| essential_load4_extra: | Optional | | Sensor that contains additional information you want displayed for your essential load 4 e.g. Daily kWh, Temperature etc.
| essential_load5_extra: | Optional | | Sensor that contains additional information you want displayed for your essential load 5 e.g. Daily kWh, Temperature etc.
| essential_load6_extra: | Optional | | Sensor that contains additional information you want displayed for your essential load 6 e.g. Daily kWh, Temperature etc.
| load_power_L1: | Optional | | Load L1 Power (W).
| load_power_L2: | Optional | | Load L2 Power (W).
| load_power_L3: | Optional | | Load L3 Power (W).
| aux_power_166: | Optional | `sensor.sunsynk_aux_power` | Auxilary power (W). |
| aux_load1: | Optional | | Sensor that contains the power of your AUX load 1 (W). |
| aux_load2: | Optional | | Sensor that contains the power of your AUX load 2 (W). |
| aux_load1_extra: | Optional | | Sensor that contains additional information you want displayed for your aux load 1 e.g. Daily kWh, Temperature etc. This entity can also be used to display additioanl sensor information above the aux icon when `aux_loads: 0`. |
| aux_load2_extra: | Optional | | Sensor that contains additional information you want displayed for your aux load 2 e.g. Daily kWh, Temperature etc. |
| aux_connected_status: | Optional | | AUX Connected Status `on/off` or `1/0`.
#### Grid Entities
| Attribute | Requirement | Default | Description |
|----------------------------|--------------|------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| day_grid_import_76: | Optional | `sensor.sunsynk_day_grid_import` | Daily grid import (kWh). |
| day_grid_export_77: | Optional | `sensor.sunsynk_day_grid_export` | Daily grid export (kWh). |
| grid_ct_power_172: | **Required** | `sensor.sunsynk_grid_ct_power` | Grid CT L1 power (W). |
| grid_ct_power_L2: | Optional | `none` | Grid CT L2 power (W). |
| grid_ct_power_L3: | Optional | `none` | Grid CT L3 power (W). |
| grid_ct_power_total: | Optional | | For three phase systems. The card will automatically calculate this based on (Grid CT L1 power + Grid CT L2 power + Grid CT L3 power) You can optionally provide your own sensor for total grid power. (W).
| grid_voltage: | Optional | `sensor.solis_grid_voltage` | Sensor providing grid voltage (v). Used only when inverter model is set to `solis`.
| nonessential_power | Optional | `none` | The card will automatically calculate this sensor based on the formula below if the attribute is set to `none` or the sensor is not defined. You can overide this by supplying a sensor that measures non-essential power e.g. `Load power Non-Essential` in the case of Solar Assistant. You can also disable this sensor by setting it's value to any arbitrary value i.e. `nonessential_power: no` and it will display a zero value and not effect autarky and ratio calculations (W).
| non_essential_load1: | Optional | | Sensor that contains the power of your non-essential load 1 (W). |
| non_essential_load2: | Optional | | Sensor that contains the power of your non-essential load 2 (W).
| non_essential_load3: | Optional | | Sensor that contains the power of your non-essential load 3 (W).
| non_essential_load1_extra: | Optional | | Sensor that contains additional information you want displayed for your nonessential load 1 e.g. Daily kWh, Temperature etc.
| non_essential_load2_extra: | Optional | | Sensor that contains additional information you want displayed for your nonessential load 2 e.g. Daily kWh, Temperature etc.
| grid_connected_status_194: | Optional | `binary_sensor.sunsynk_grid_connected_status` | Grid connected status (case insensitive) `on/off`,`1/0`, `On-Grid/Off-Grid`, or `On Grid/Off Grid`. |
| energy_cost_buy: | Optional | | Sensor that provides current buy energy cost per kWh.
| energy_cost_sell: | Optional | | Sensor that provides current sell energy cost per kWh.
| prepaid_units: | Optional | | Account balance of prepaid electricity units.
| max_sell_power: | Optional | `number.sunsynk_max_sell_power` | Sets the maximum allowed output power to flow to the grid. Also known as "Export Control User Limit" (W).
The card calculates the sensors below based on supplied attributes in the config so you dont need to define them in Home
Assistant. NOTE if your essential and non-essential readings are innacurate replace sensor 169 with 167. Alternatively
provide the card with sensors that calculate this data i.e essential_power: and nonessential_power:
If `three_phase:false`
```
totalsolar = pv1_power_186 + pv2_power_187 + pv3_power_188 + pv4_power_189
nonessential = grid_ct_power_172 - grid_power_169
essential = inverter_power_175 + grid_power_169 - aux_power_166
```
If `three_phase:true`
```
totalsolar = pv1_power_186 + pv2_power_187 + pv3_power_188 + pv4_power_189
nonessential = grid_ct_power_172 + grid_ct_power_L2 + grid_ct_power_L3 - grid_power_169
essential = load_power_L1 + load_power_L2 + load_power_L3
```
The modbus registers can be visualised on the `full` card below:
