I want to set the charge level on my solar battery depending on the Solcast forecast. If Solcast predicts X kWh then set it to 80% if it predicts Y kWH then set it to 70%. I want to put this in an automation.
What is the best way to do this. Do I use a Template that has the IF states or a script?
I am not looking for the code, I want to work that out. I just want to know the best direction.