Calculate/Display cost savings from self consumed solar energy

Would it be possible to add the calculated cost savings from the self consumed solar energy in the energy view like you display cost from sold energy?

Would love to see this implemented! They have the data so I don’t see why it shouldn’t be possible!

Same here, having the savings calculated is really something I miss.

This is how I’m calculating this here, which variable buy/ sell pricing.

1 Like

Would also like to have this feature.

3 Likes

I would also like to have this feature.

I mean ok, every year you can compute it yourself to estimate when ROI will be reached.
But why not just add it to the energy dashboard…

There is a duplicate feature request from January 2022:

How have you written the sensors for things like:
“Solar to grid”,“Solar to battery”,“grid to battery” etc?

It seems like this data ought to be readily available out of the energy data in HA but i can’t find reference to them.

I calculate the actual power flow for each component using these templates:

Then use powercalc to calculate the energy flow for each component. (or you could use rheinman integration)

Which visualises very nicely on the energy dashboard:

and the Sankey card:

@markpurcell

As I understand correctly, I need to have the Tesla Powerwall integration to create the base sensors like:

# grid sensor must be negative when importing and positive when exporting
    - name: APF Grid Entity
      device_class: power
      state_class: measurement
      unit_of_measurement: W
      state: "{{ (0 - states('sensor.powerwall_site_now')|float(0)*1000)|int(0) }}"

# sensor must always be 0 or positive (i think they always are)
    - name: APF House Entity
      device_class: power
      state_class: measurement
      unit_of_measurement: W
      state: "{{ (states('sensor.powerwall_load_now')|float(0)*1000)|int(0) }}"

# sensor must always be 0 or positive (i think they always are)
    - name: APF Generation Entity
      device_class: power
      state_class: measurement
      unit_of_measurement: W
      state: "{{ (states('sensor.powerwall_solar_now')|float(0)*1000)|int(0) }}"

# battery sensor must be positive when charging and negative when discharging
    - name: APF Battery Entity
      device_class: power
      state_class: measurement
      unit_of_measurement: W
      state: "{{ (0 - states('sensor.powerwall_battery_now')|float(0)*1000)|int(0) }}"

But what to do if I dont have the Tesla Powerwall and want to create these 4 base entities,

You need to identify the equivalent for your household setup for the four key variables; solar, site, house and battery power flow.

I thought so, but how do I create a sensor for the house? How do I calculate this.
I have entities for grid import and export, battery charge and discharge and solar production.
The problem is how to calculate what the house is using, I can see this in the standard energy dashboard, but there is still no entity available for.

Thanks,
Rien

You can make a template sensors (apf house entity) to calculate your house consumption:

House Consumption = solar + gridImport - GridExport + BatteryDischarge - BatteryCharge

Thanks,

I think it’s working. Will let it run for a couple of days

1 Like