Power Flow Card Plus šŸš€

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

Yes. Thatā€™s how I have set it.

You can however choose to have the individual entities subtracted from the Home number.

Itā€™s an option in the set up:

1 Like

I suggest reading through the user guide:

1 Like

thanks
I did see and used the option too (Subtract)

I know now (thanks for the help! appreciate) what I have to do: I need to define a template sensor that is the SUM of the grid for the ā€œregularā€ consumption and the Heat_Pump consumption

The Heat-Pump is coming from the Grid but has a different meter and when I have surplus energy from Solar, because it is a different meter, it is send to the grid although the heat-pump could use it.

Cheers
Luis

First of all, thank you so much for your really great job with this card.
Is it possible to connect multiple solar inverter to this card?
Maybe the question is stupid since Iā€™m a newbyeā€¦
Thanks

Not directly.

If you want to display the combined output of multiple inverters you will need to create a template sensor to do that first, then use that sensor as the solar input for the card.

At least thatā€™s what I have done. I have two inverters and have combined their output with a template sensor:

  - platform: template
    sensors:
      pv_power_total_combined:
        unit_of_measurement: "W"
        value_template: >
          {% set GridPV = states('sensor.power_photovoltaics_fronius_power_flow_0_http_192_168_0_201') | float %}
          {% set OffGridPV = states('sensor.pv_power') | float %}
          {{ (GridPV + OffGridPV) | float }}

Then I use the new sensor pv_power_total_combined as the input for the card.

I changed my card settings to subtract the individual items (EV and water heater) from the homeā€™s consumption. This is what it looked like earlier this morning:

1 Like

does anyone know why i get the following error when trying to use the visual editor?

Visual editor is not supported for this configuration:
s.entries is not a function
You can still edit your config in YAML

type: custom:power-flow-card-plus
entities:
  grid:
    entity: sensor.myenergi_fairburn_power_grid
  solar:
    entity: sensor.givtcp_chxxxxxx_pv_power_string_1
  home:
    entity: sensor.myenergi_fairburn_home_consumption

Actually, I like your powerful Power Flow Card Plus pretty much! Thanks a lot for providing and further improving it.

I use the secorndary value for temperature - for Solar outside temperature, for Home inside temperature. However now with minus Ā°C it shows 0, it seems, it doesnā€™t show negative values. It would be quite nice to support also negative values if no other reason exists against this.
Thanks a lot!
Alfred

Installed it today seems to work nice!

Hope that in the future there will be more then 2 individual sources for monitoring

1 Like