Energy used in day light and after dark - Sunrise-sunset-sunrise

Hi community

I’m already using the Utility and Energy elements of Home Assistant and that’s working fine, I get my total daily/weekly/monthly energy usage. What I’m trying to understand is what I’m consuming energy wise between sunrise and sunset and then before sunrise. I’m on the wait list for a Solar install and I want to ensure I have enough head room in the installation and batteries before its installed.

Has anyone done something similar and is it even possible with a moving target like Sunrise/Sunset - Any help would be appreciated.

Did you solved it in any way?
I also want this information, to understand how much I use from the battery.

I just found a way that I am testing. Using History state.

I will let you know here how it goes