Offline Solar forecast / battery state forecast - integration


I created a algorithm that tries to predict the charge and discharge behavior of a home solar charged battery. It was designed to work with this integration: click here
but can be easily configured for any system.

It makes it really easy to for example figure out if some devices need top be shut down over night in order to be as self-sufficient as possible!

And the best part is: no external services are required! Therefore a Internet or a future provider outage doesnt affect the system.


all features are tested and only approximate real circumstances!

  • fully offline!
  • predict battery state at evening after charging
  • predict battery state at morning after decharging
  • predict battery charging time
  • predict minimum charge needed to get over night
  • predict time left of solar
  • predict start of charging
  • example lovelace card (mushroom required)


  • english (documented, not all entity names translated)
  • german (card/entity namens)

Lovelace card

I have also created a fitting lovelace card config:

(note it may need to be translated from german to english please contribute that on github)

Installation and more Information:

there is a whole list oder todo‘s. It would be amazing if anyone who improves the code can contribute on github!


v0.1 initial release
v0.2 fixed card templates
v0.3 varoius fixes!
v0.4 bug fixes

Please PR for new features /ideas on Github!


Thank you very much for sharing! I like the approach very much. Nice idea with conditional cards. :+1:

Are you using Forecast.Solar? I often thought of using the forecast to predict the excess of energy production. (How much energy can I consume and still end up with 100 % battery charge in the evening)

Actually all is done fully local, by detecting trends in the data and extrapolating it. Therefore no problems when or if Forecast.Solar does not exist anymore!

Yes this info is also indirecty given by looking at the charging time left and the rest solar production of today actually! :+1: