jasonacox / Powerwall-Dashboard

Grafana Monitoring Dashboard for Tesla Solar and Powerwall Systems
MIT License
293 stars 61 forks source link

Add solar self-consumption % #252

Open GrimmiMeloni opened 1 year ago

GrimmiMeloni commented 1 year ago

Problem Currently there is no indication of how much of the solar generated power is being self-consumed (vs. sent to the grid)

Enhancement Similar to the % Solar Powered for the Home, I would like to also see another stat element that shows the percentage of the solar power being self consumed. The query can be more or less taken 1:1 from the existing % solar powered element, just changing the values like this.

SELECT (solar - to_grid) / solar FROM 
  (SELECT integral("solar")  AS solar, integral("to_grid")  AS to_grid 
      FROM "autogen"."http" WHERE $timeFilter)

My main interest in this number stems from being interest in how the solar installation fares financially.

Additional context Here's an example of how it looks locally for me (it's the 78.2%). I don't like that it messes with the overall alignment a bit. Maybe someone has a better idea on how to make this fancy.

Bildschirmfoto 2023-04-23 um 09 09 59
jasonacox commented 1 year ago

Thanks for this, @GrimmiMeloni ! I always struggle knowing how much of this we should include in the base install. I tend to try to keep the base minimal, though I think it is fair to say that it is already busy. However, I'm more than happy to add a new dashboard in our Alternative Dashboard folder if you want to submit a PR for this.