Hey! I have recently setup a solar system, and I’ve integrated it into HA with a custom code that I wrote since there was no official integration for it. I have all values needed, such as generation, battery power, etc that updates about every 15 seconds.
The thing is, however, that there’s no value for how much power has been generated during the last hour/day.
Is it possible to somehow create a sensor that takes the state of one of these sensors (let’s say the solar power generation, in W), and then get how much Wh has been produced the last hour/day?
I can’t just simply take the state and times that with 60 to get the last hour, because the value changes every 15 seconds and that wouldn’t be correct.
Thank you in advance!