Solar benefit calculations

Hi Arva this looks great and exactly what I need, thank you for this. I’m new to HA and when trying to paste your code into my configuration.yaml I’m getting loads of syntax errors. Is there a new format for the templates now?

Also, would your method work if I only have yesterdays data available? Thanks