Energy Management - Live Calculation

Hello Home Assistant Community :slight_smile:

I’m just trying to figure out how to calculate my autarchy and ownconsumption in real time.
I just don’t know with which formula…

I got a lot of values to work with (Everything is given in Watt):

  • Solar Producing (Total Producing of my solar plant) : sensor.solar_producing_w
  • Gridabsorbed (From grid to house): sensor.metering_power_absorbed
  • Gridsupplied (From solar to grid): sensor.solar_to_grid
  • Battery to house: sensor.battery_power_discharge_total
  • Solar to Battery: sensor.battery_power_charge_total

How do I calculate autarchy and ownconsumption with those values?

I really hope this is enough information. I can’t really get it right.