Power Flow Card Plus 🚀

I love the plugin and its visual approach to show where the energy comes from used in the house. What I like especially is that the ring around the house shows the share of the energy sources (solar/grid/battery).

Only pitty is, that this is only a snapshot of exactly “NOW”.What I am looking for is the data shown in the colored ring, but spread over time. I created a mockup to try out in excel.

I dont have yet my solar running … so I cant experiement in HA. Had to do it in Excel.

Have you guys came across a similar approach in HA here somwhere where I could dive into teh YAML and how its done?

If not … any Idea how this could be approached using lovelace cards?

I made soma assumptions on consumption and solar production.
This is how it could look like in Summer:

And this is how it could look like in Winter:

I hope you get the gist. Granularity could be hours … or even days.

Looking forward to some advice from you HA Ninjas.

This is exactly what Home Assistant’s standard built-in energy dashboard does:

Choose day, week, month, year, or even add a custom date picker with a special add on.

Clear. I want this graph promiently in my standard dashboard bc this is what displayed on a big screen in the living room. I dont want this on the extra energy panel. Can we easily recreate this graph in a dahsboard?

Yes you can, https://www.home-assistant.io/dashboards/energy/

1 Like

Guys, I have installed Power Flow Chard Plus and it works like a charm on my Browser on the PC. I have a Picture Frame which runs a Kiosk Browser. There the card will not show. What am I missing here?

This is in the Kiosk Browser

This is in the Laptop Browser:

High wgumaa,

my configuration looks like

type: custom:sunsynk-power-flow-card
cardstyle: full
panel_mode: false
large_font: true
show_solar: true
show_battery: true
card_height: 500px
title: Solar
title_size: 25px
decimal_places: 2
inverter:
  autarky: power
  auto_scale: false
battery:
  energy: 5180
  invert_power: false
  shutdown_soc: 7
  full_capacity: 96
  empty_capacity: 7
  show_daily: true
  animation_speed: 6
  max_power: 5180
  auto_scale: false
solar:
  show_daily: true
  mppts: 1
  pv1_name: Roof
  max_power: 6100
  animation_speed: 6
  auto_scale: false
load:
  show_daily: true
  auto_scale: true
  animation_speed: 4
  max_power: 10000
grid:
  show_daily_buy: true
  show_daily_sell: true
  show_nonessential: false
  inverter_grid: false
  auto_scale: true
  animation_speed: 20
  max_power: 10000
entities:
  day_battery_charge_70: sensor.daily_battery_charge
  day_battery_discharge_71: sensor.daily_battery_discharge
  day_load_energy_84: sensor.daily_load_kwh
  day_grid_import_76: sensor.daily_grid_buy_kwh
  day_grid_export_77: sensor.daily_grid_sell_kwh
  grid_connected_status_194: null
  inverter_status_59: null
  inverter_voltage_154: sensor.inverter_grid_voltage
  load_frequency_192: sensor.inverter_power_storage_grid_frequency
  inverter_current_164: sensor.inverter_inverter_current
  inverter_power_175: sensor.inverter_power_storage_inverter_ac_power
  grid_power_169: sensor.inverter_power_storage_grid_power
  pv1_power_186: sensor.inverter_power_storage_generator_a_power
  battery_voltage_183: sensor.inverter_power_storage_battery_voltage
  battery_soc_184: sensor.inverter_power_storage_battery_state_of_charge
  day_pv_energy_108: sensor.daily_solar_kwh
  battery_power_190: sensor.inverter_power_storage_battery_power
  battery_current_191: sensor.inverter_power_storage_battery_current
  grid_ct_power_172: sensor.inverter_power_storage_grid_power
  pv1_voltage_109: sensor.inverter_power_storage_generator_a_voltage
  pv1_current_110: sensor.inverter_pv1_current
  remaining_solar: sensor.solcast_forecast_remaining_today
  battery_temp_182: sensor.inverter_power_storage_battery_temperature

Most of the values come directly form my solar devices. The following sensor I needed to calculate:

  • daily_battery_charge (as utility meter)
  • daily_battery_discharge (as utility meter)
    All as template sensors:
  • sensor.daily_solar_kwh
  • sensor.daily_load_kwh
  • sensor.daily_grid_buy_kwh
  • sensor.daily_grid_sell_kwh
  • sensor.inverter_pv1_current
  • sensor.inverter_grid_voltage
  • sensor.inverter_inverter_current
    The sensors ending with _kwh were neccessary, because my inverter only returns wh.

An example for the template sensor for grid_sell:

- sensor:
    - name: "Daily Grid Sell kWh"
      unit_of_measurement: kWh
      state: |
        {{ (states('sensor.inverter_power_storage_grid_energy_production_day') | float ) / 1000 | round(3) }} 

Daily solar is provided by the solcast integration (sensor.solcast_forecast_remaining_today).

Some of the calculated values may not be exactly correct, as I tried to calculate them from provided values from my inverter like ampere, voltage or watt.

Hope it will help you.
Maybe you should check, what values are provided by your photovoltaic system and reading the manual for sunsynk-power-flow-card

1 Like

Your configuration doesn’t belong here, it’s a different energy card.

I pretty well know that, however, I was asked and politeness and respect for others made me publish my config here. Pls. feel free to move it to the correct section.

1 Like

Just create your own thread.

Hi,

I’m almost have all these sensors myself. Do you mind sharing your code for this whole page ? Looks really awesome !

Thanks in advance !

KR,

Bart

Not updated since weeks - but provide you an overview about the dashboards - be carefull - alph or beta versions only

Question of a newbie using HA :slight_smile:

How can I get the state of my car (Tesla) in Power Flow? Percentage or kWh? I’ve already a tab on HA where I can see it, but would be nice to see it in Power Flow too :slight_smile:

I currently use the Tesla powerwall integration as the primary source for tesla-style-solar-power-card. This card’s documentation provided full template sensor code needed to make the card work (presuming I have the use has the Tesla powerwall integration). So, it was relatively easy to setup.

Then, I noticed that power-flow-card-plus card appears to have more features than the tesla card I’m currently using. However, I don’t know how to use it with my Telsa Powerwall source sensors (like I do with the Tesla-Style-Solar-Power-card) this card’s documentation doesn’t provide the needed template sensors for it all to work.

Can someone please provide the necessary template code to fully support this card’s capabilities presuming I have available the default Tesla Powerwall source sensor names: sensor.powerwall_site_power
sensor.powerwall_load_power
sensor.powerwall_solar_power
sensor.powerwall_battery_power

I’m not sure why my current Tesla-style-flow card has so many template sensor code and the Power Flow Card Plus card doesn’t seem to require any? I think I’m missing something fundamental. Below are all the template sensors I use currently for Telsa-style-flow card:

      # Tesla Powerwall custom card support:
      - name: APF Grid Entity
        device_class: power
        state_class: measurement
        unit_of_measurement: W
        state: "{{ ((0 - states('sensor.powerwall_site_power')|float * 1000) / 100)|round(0) * 100 }}"
      - name: APF House Entity
        device_class: power
        state_class: measurement
        unit_of_measurement: W
        state: "{{ (states('sensor.powerwall_load_power')|float * 1000 / 100)|round(0) * 100 }}"
      - name: APF Generation Entity
        device_class: power
        state_class: measurement
        unit_of_measurement: W
        state: "{{ (states('sensor.powerwall_solar_power')|float * 1000 / 100)|round(0) * 100 }}"
      - name: APF Battery Entity
        device_class: power
        state_class: measurement
        unit_of_measurement: W
        state: "{{ ((0 - states('sensor.powerwall_battery_power')|float * 1000) / 100)|round(0) * 100 }}"
      - name: APF Grid Import
        device_class: power
        state_class: measurement
        unit_of_measurement: W
        state: >
          {% if states('sensor.apf_grid_entity')|int(default=0) < 0 %}
            {{ states('sensor.apf_grid_entity')|int(default=0)|abs }}
          {% else %}
            0
          {% endif %}
      - name: APF Inverter Power Consumption
        device_class: power
        state_class: measurement
        unit_of_measurement: W
        state: "{{ states('sensor.apf_generation_entity')|int(default=0) - states('sensor.apf_battery_entity')|int(default=0) - states('sensor.apf_house_entity')|int(default=0) - states('sensor.apf_grid_entity')|int(default=0) }}"
      - name: APF Real House Load
        device_class: power
        state_class: measurement
        unit_of_measurement: W
        state: "{{ states('sensor.apf_house_entity')|int(default=0) + states('sensor.apf_inverter_power_consumption')|int(default=0) }}"
        icon: mdi:home-lightning-bolt
      - name: APF Grid2House
        device_class: power
        state_class: measurement
        unit_of_measurement: W
        state:  >
          {% if states('sensor.apf_grid_import')|int(default=0) > states('sensor.apf_real_house_load')|int(default=0) %}
            {{ states('sensor.apf_real_house_load')|int(default=0) }}
          {% else %}
            {{ states('sensor.apf_grid_import')|int(default=0) }}
          {% endif %}
      - name: APF Grid2Batt
        device_class: power
        state_class: measurement
        unit_of_measurement: W
        state: >
          {% if states('sensor.apf_grid_import')|int(default=0) > states('sensor.apf_real_house_load')|int(default=0) %}
            {{ states('sensor.apf_grid_import')|int(default=0) - states('sensor.apf_real_house_load')|int(default=0) }}
          {% else %}
            0
          {% endif %}
      - name: APF Batt2House
        device_class: power
        state_class: measurement
        unit_of_measurement: W
        state: >
          {% if states('sensor.apf_battery_entity')|int(default=0) < 0 %}
            {% if states('sensor.apf_battery_entity')|int(default=0)|abs > states('sensor.apf_real_house_load')|int(default=0) %}
              {{ states('sensor.apf_real_house_load')|int(default=0) }}
            {% else %}
              {{ states('sensor.apf_battery_entity')|int(default=0)|abs }}
            {% endif %}
          {% else %}
            0
          {% endif %}
      - name: APF Batt2Grid
        device_class: power
        state_class: measurement
        unit_of_measurement: W
        state: >
          {% if states('sensor.apf_battery_entity')|int(default=0) < 0 %}
            {% if states('sensor.apf_battery_entity')|int(default=0)|abs > states('sensor.apf_real_house_load')|int(default=0) %}
              {{ states('sensor.apf_battery_entity')|int(default=0)|abs - states('sensor.apf_real_house_load')|int(default=0) }}
            {% else %}
              0
            {% endif %}
          {% else %}
            0
          {% endif %}
      - name: APF Solar2Grid
        device_class: power
        state_class: measurement
        unit_of_measurement: W
        state: >
          {% if states('sensor.apf_grid_entity')|int(default=0) > states('sensor.apf_batt2grid')|int(default=0) %}
            {{ states('sensor.apf_grid_entity')|int(default=0) - states('sensor.apf_batt2grid')|int(default=0) }}
          {% else %}
            0
          {% endif %}
      - name: APF Solar2House
        device_class: power
        state_class: measurement
        unit_of_measurement: W
        state: >
          {% if states('sensor.apf_generation_entity')|int(default=0) > 0 and states('sensor.apf_real_house_load')|int(default=0) > states('sensor.apf_batt2house')|int(default=0) + states('sensor.apf_grid_import')|int(default=0) %}
            {% if states('sensor.apf_generation_entity')|int(default=0) > states('sensor.apf_real_house_load')|int(default=0) - states('sensor.apf_batt2house')|int(default=0) - states('sensor.apf_grid2house')|int(default=0) %}
              {{ states('sensor.apf_real_house_load')|int(default=0) - states('sensor.apf_batt2house')|int(default=0) - states('sensor.apf_grid2house')|int(default=0) }}
            {% else %}
              {{ states('sensor.apf_generation_entity')|int(default=0) }}
            {% endif %}
          {% else %}
            0
          {% endif %}
      - name: APF Solar2Batt
        device_class: power
        state_class: measurement
        unit_of_measurement: W
        state: >
          {% if states('sensor.apf_generation_entity')|int(default=0) > 0 and states('sensor.apf_battery_entity')|int(default=0) > 0 %}
            {% if states('sensor.apf_battery_entity')|int(default=0) > states('sensor.apf_grid2batt')|int(default=0) %}
              {% if states('sensor.apf_generation_entity')|int(default=0) - states('sensor.apf_solar2house')|int(default=0) > states('sensor.apf_battery_entity')|int(default=0) - states('sensor.apf_grid2batt')|int(default=0) %}
                {{ states('sensor.apf_battery_entity')|int(default=0) - states('sensor.apf_grid2batt')|int(default=0) }}
              {% else %}
                {{ states('sensor.apf_generation_entity')|int(default=0) - states('sensor.apf_solar2house')|int(default=0) - states('sensor.apf_solar2grid')|int(default=0) }}
              {% endif %}
            {% else %}
              0
            {% endif %}
          {% else %}
            0
          {% endif %}

Does anyone use this card with a single EV charge point but mutliple EVs? Not sure what the best way to do it is, other than having a “dummy” entity so that it always looks like EV1 is charging even if EV2 is charging:

  individual1:
    entity: input_number.zero
    icon: mdi:car-electric
    color: '#80b8ff'
    name: e-Niro
    color_icon: false
    display_zero: true
    secondary_info:
      entity: sensor.e_niro_4_ev_battery_level
      unit_of_measurement: '%'
  individual2:
    entity: sensor.ev_charge_point_power
    icon: mdi:car-electric
    color: '#80b8ff'
    name: EV6
    color_icon: false
    display_zero: true
    secondary_info:
      entity: sensor.ev6_ev_battery_level
      unit_of_measurement: '%'

The only other way I can think of is to make it look like both cars are charging which seems silly.

I just have one EV (x2) icon and use this code in secondary info:

{{states('sensor.m3p_battery') + '% ' + states('sensor.my_battery') +'%'}}

image

I have my full configuration available:

What entity should I use for showing grid power is off? (Outage) Deye inverter

Hi Luca
Parabéns!!!
This is absolutely fantastic work!!! Wow!

Please keep on! And thanks!

I only have a quick question on a matter that is puzzling me…
The energy in the home bubble is in my case not adding the energy going out fro there to the additional devices attached to it… just adds grid

  • solar energy

Am I missing any setting

Thanks!!!’

I have also installed it and am loving it.
But I see you have the same situation as in my case (or at least as I interpreted):
I thought that by adding the individual items the consumption of the house would be automatically adjusted … (but it isn’t …)

I have a heat pump for heating and the electricity counter is separate
So I guess I have to add the two sensors and define this sum as the one for the grid?

I have no entity defined in the set up for “Home”.

It uses the net of power flow data from the entities defined for solar, grid and battery to determine the home’s power consumption value and automatically adjusts.

The individual sensors do not affect the home’s consumption value, they are for display of extra data and use their own sensors.

I would very much like to have a few more of those individual display circles as I have several individually monitored buildings I can display.

Screen Recording 2023-11-11 at 9.02.21 am (1)

Thanks for responding
I also habe no entity for home… but so you say that if teh power of one of the bubbles ( let’s say the car above) was 5kW the number shown in the home circle would not change… I…e the power of the Individual bubbles are not counted… just the grid, solar and battery…

Did I understand correctly? Because that is what I have too but I thought the home circle would count it since it is energy being consumed