Skip to content
View in the app

A better way to browse. Learn more.

Power Forum - Renewable Energy Discussion

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Home Assistant Sunsynk Power Flow Card and Dashboard

Featured Replies

  • Author
This post was recognized by Energy-Jason!

slipx was awarded the badge 'Helpful' and 15 points.

2 hours ago, gkj_muk said:

Thank you very much for a great card. I am failing to get my Autarky values to show, I know its something to do with my entities but I cannot figure out which entities, are you able to point me in the correct direction?

 

 

Screenshot 2023-07-20 at 17.09.49.png

Hi. What is your Autarky card attribute set to? power or energy? Nan means you are providing input that is not a number? So probably a sensor that is "Unavailable"

By default it calculates Autarky and Ratio based on power. It reads the following sensors:

totalsolar, battery_power , aux_power , essential, nonessential 

It requires daily totals to be setup if set to Energy   

Edited by slipx

  • Replies 591
  • Views 127.8k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • thank you @slipx, I've been using the power flow card for a while now but didn't know about the animations. now thanks your examples I've implemented the animations. I use a generator on my AUX port

  • I've made  a small update to the Dashboard. The load shedding card shows remaining time based on battery SOC and battery power. You will need to create some template sensors as discussed here and prov

  • Here's a slight contribution to the goodness on this thread which lives on my main HA screen: type: custom:bar-card entities: - entity: sensor.load_shedding_area_eskde_4_sandownext10cityofj

Posted Images

@slipx May I ask, the Monthly Card ( Card 16 )from your dashboard. Does this card only show Data after a month or will it show data that has accumulated during the month ?

All my cards are working but the Monthly Production is showing no info ? Maybe have to wait till the end of the month.

Double checked the sensors and they all correct.

Would appreciate some advice.

Thanks

On 2023/07/20 at 6:22 PM, slipx said:

Hi. @Muttley No it doesn't work like that. The nonessential load will be supplied from the grid and is not an input to the inverter. Additionally the AUX input not shown on your diagram can be used to feed power i.e. micro-inverter or generator as well ad supply power to a load.

Thanks for the feedback and the explanation 😉

  • Author
3 hours ago, Vaughanza said:

@slipx Is there a way that I can change the colour of the Generator, different colour from the Load ? I like Aux and Load Icons to be two different colours thanks.

I'm sure I can add that for you

  • Author

v1.9.3

Updates
Adds the optional aux_colour attribute to the load card configuration to change the colour of all the AUX objects. If omitted will use the colour set for the load or default load colour if this is not set.

image

Hi @slipx Thansk for your efforts here. Top notch card.

I'm busy applying the card to my luxpower inverter and trying to match the sensors so would appreciate some assistance with my assumptions below.

 

  inverter_voltage_154: 
  load_frequency_192: 
  inverter_current_164: 
  inverter_power_175: 

Is this what the inverter is sending to the house?

 

inverter_status_59:

I'm guessing I need to change the code mappings in your sourcecode to show the correct luxpower statuses?

 

battery_power_190: 
battery_current_191:
grid_power_169:

Is this for both in and out, so a discharge current/power must be represented by a negative value?

EDIT: Nevermind... I see the docs confirmed this question.

 

day_load_energy_84:

kWh consumed by the house for the day?

 

 

 

Edited by Zombie

  • Author
3 hours ago, Zombie said:

Hi @slipx Thansk for your efforts here. Top notch card.

I'm busy applying the card to my luxpower inverter and trying to match the sensors so would appreciate some assistance with my assumptions below.

  inverter_voltage_154: 
  load_frequency_192: 
  inverter_current_164: 
  inverter_power_175: 
  

Is this what the inverter is sending to the house?

 

inverter_status_59:

I'm guessing I need to change the code mappings in your sourcecode to show the correct luxpower statuses?

 

battery_power_190: 
battery_current_191:
grid_power_169:

Is this for both in and out, so a discharge current/power must be represented by a negative value?

EDIT: Nevermind... I see the docs confirmed this question.

 

day_load_energy_84:

kWh consumed by the house for the day?

 

 

 

Hi

Does this help https://github.com/slipx06/sunsynk-power-flow-card/wiki/Example-Card-Configurations#luxpower-tek-inverter

If you look at the readme their is a brief description of the different entities. 

day_load_energy_84 - This is the energy used by the load on the inverter output

inverter_voltage_154:  - Voltage from inverter measurement point
load_frequency_192:  -  The frequency of the load on the output
inverter_current_164:  -  Current from inverter measurement point
inverter_power_175:  - Power from inverter measurement point

You can supply these with sensors that make the most sense for your setup and what you are interested in seeing. 

 

Edited by slipx

1 hour ago, slipx said:

Hi

Does this help https://github.com/slipx06/sunsynk-power-flow-card/wiki/Example-Card-Configurations#luxpower-tek-inverter

If you look at the readme their is a brief description of the different entities. 

day_load_energy_84 - This is the energy used by the load on the inverter output

inverter_voltage_154:  - Voltage from inverter measurement point
load_frequency_192:  -  The frequency of the load on the output
inverter_current_164:  -  Current from inverter measurement point
inverter_power_175:  - Power from inverter measurement point

You can supply these with sensors that make the most sense for your setup and what you are interested in seeing. 

 

Haibo!!!  I'm sure I looked the other day and there was no Luxpower entry. Sorry for wasting your time.

 

PS. Had a quick scan. I don't have have any of those entities. I use the lxpbridge integration. I'll do the mappings and send to you so you can have a copy/paste solution for it. 

 

Thanks

@slipx is there any way that we can create an entity for Autarky?

I'd like to be able to view this within my bar-card on my front page of HA and also be able to view this over a date range.

(will help convince the Mrs why we need more panels and batteries 🤪)

5 hours ago, Muttley said:

is there any way that we can create an entity for Autarky?

Copied directly from the javaScript. Turning this into an entity should be very easy

```

const stateObj = this.hass.states[config.entities.day_battery_discharge_71] || { state: '0' };
const stateObj1 = this.hass.states[config.entities.day_battery_charge_70] || { state: '0' };
const stateObj2 = this.hass.states[config.entities.day_load_energy_84] || { state: '0' };
const stateObj3 = this.hass.states[config.entities.day_grid_import_76] || { state: '0' };
const stateObj4 = this.hass.states[config.entities.day_pv_energy_108] || { state: '0' };
 
//Autarky in Percent = Home Production / Home Consumption
//Ratio in Percent = Home Consumption / Home Production
let production_e = parseFloat(stateObj4.state) + parseFloat(stateObj.state);
let consumption_e = parseFloat(stateObj2.state) + parseFloat(stateObj1.state);
let Autarky = consumption_e != 0 ? Math.min(Math.round((production_e * 100) / consumption_e), 100) : 0;
let Ratio = production_e != 0 ? Math.min(Math.round((consumption_e * 100) / production_e), 100) : 0;
```
  • Author

Or if you want to use power output to calculate, which provides more real time data and is the default for the card, the formula is

    let production_p = parseInt(totalsolar) + parseInt(`${battery_power > 0 ? battery_power : 0}`) + parseInt(`${aux_power < 0 ? aux_power * -1 : 0}`);
    let consumption_p = parseInt(essential) + parseInt(nonessential) + parseInt(`${aux_power > 0 ? aux_power : 0}`) + parseInt(`${battery_power < 0 ? battery_power * -1 : 0}`);
    let Autarkyp = consumption_p != 0 ? Math.min(Math.round((production_p * 100) / consumption_p), 100) : 0;
    let Ratiop = production_p != 0 ? Math.min(Math.round((consumption_p * 100) / production_p), 100) : 0;

 

  • Author

v1.9.4

Updates
You can now provide a sensor for your total solar output. There is a new entities attribute called pv_total:
If a sensor is provided it becomes clickable to show historical data. If no sensor is provided the card will continue to use the internal logic to calculate the total pv based on pv1+pv2+pv3+pv4

16 hours ago, slipx said:

Or if you want to use power output to calculate, which provides more real time data and is the default for the card, the formula is

    let production_p = parseInt(totalsolar) + parseInt(`${battery_power > 0 ? battery_power : 0}`) + parseInt(`${aux_power < 0 ? aux_power * -1 : 0}`);
    let consumption_p = parseInt(essential) + parseInt(nonessential) + parseInt(`${aux_power > 0 ? aux_power : 0}`) + parseInt(`${battery_power < 0 ? battery_power * -1 : 0}`);
    let Autarkyp = consumption_p != 0 ? Math.min(Math.round((production_p * 100) / consumption_p), 100) : 0;
    let Ratiop = production_p != 0 ? Math.min(Math.round((consumption_p * 100) / production_p), 100) : 0;

 

Thanks - will consult with me good old friend Google for the next steps

 

  • Author

Not tested, but a good starting point

EDIT updated to handle ?. You'll need another template to limit output between 0 and 100 Limit maximum value to 100

sensor:
  - platform: template
    sensors:
      production_p:
        friendly_name: "Production Power"
        unit_of_measurement: "W"
        value_template: >
          {% set battery_power = states('sensor.battery_power') | int %}
          {% set aux_power = states('sensor.aux_power') | int %}
          {% set prod_solar = states('sensor.totalsolar') | int %}
          {% set prod_p = prod_solar + (battery_power if battery_power > 0 else 0) + (aux_power * -1 if aux_power < 0 else 0) %}
          {{ prod_p }}

      consumption_p:
        friendly_name: "Consumption Power"
        unit_of_measurement: "W"
        value_template: >
          {% set battery_power = states('sensor.battery_power') | int %}
          {% set aux_power = states('sensor.aux_power') | int %}
          {% set cons_essential = states('sensor.essential') | int %}
          {% set cons_nonessential = states('sensor.nonessential') | int %}
          {% set cons_p = cons_essential + cons_nonessential + (aux_power if aux_power > 0 else 0) + (battery_power * -1 if battery_power < 0 else 0) %}
          {{ cons_p }}

      autarky_p:
        friendly_name: "Autarky Percentage"
        unit_of_measurement: "%"
        value_template: >
          {% set cons_p = states('sensor.consumption_p') | int %}
          {% set prod_p = states('sensor.production_p') | int %}
          {% if cons_p != 0 %}
            {% set autarky = ((prod_p * 100) / cons_p) %}
            {% if autarky >= 100 %}
              {% set autarky = 100 %}
            {% endif %}
          {% else %}
            {% set autarky = 0 %}
          {% endif %}
          {{ autarky }}

      ratio_p:
        friendly_name: "Production/Consumption Ratio"
        unit_of_measurement: "%"
        value_template: >
          {% set cons_p = states('sensor.consumption_p') | int %}
          {% set prod_p = states('sensor.production_p') | int %}
          {% if prod_p != 0 %}
            {% set ratio = ((cons_p * 100) / prod_p) | round(0) %}
            {% if ratio >= 100 %}
              {% set ratio = 100 %}
          {% else %}
            {% set ratio = 0 %}
          {% endif %}
          {{ ratio }}

Edited by slipx

  • Author

v1.9.5

Updates
Adds a new entities attribute called aux_connected_status: This is similar to the grid_connected_status and accepts a binary sensor to indicate the connection status of the AUX input/output. Valid input is a 1/0 or on/off
Adds a new aux_off_colour attribute under the load card configuration to set the colour of the AUX icon and label when disconnected or off

image

6 hours ago, Vaughanza said:

Guys can someone explain what is Autarky on the power flow card and how it works please ?

 

from the integration github:

Quote

 

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

  • Autarky in Percent = Home Production / Home Consumption
  • Ratio in Percent = Home Consumption / Home Production

 

Edited by mzezman

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.