Open vries-ict opened 1 month ago
Both sensors are setup equal and use the same property to trigger a reset on the new day. So they should already behave the same.
Can you provide the graphs for both sensors?
‘sensor.electricity_delivery_costs_today’ (above) drops to zero just after 0:00 hours. ‘sensor.electricity_production_costs_today’ (above) also drops just after 0:00 hours but not completely to zero, just before status unavailable. I think this is the reason I ran into some issues on creating a utilitymeter for net power costs over a period of time (delivery - production), since it registers a negative value at the daily reset. For now I solved this with a template sensor with extra logic to reset and keep the value at zero at the daily reset. But maybe it can also be fixed in the source sensor itself.
@vries-ict can you test the main branch? Added a fallback to zero when sensor gets unavailable
Thanks for your swift action. Never done this before, but I found these instructions:
Installing main/beta version using HACS: Go to HACS => Integrations Click on the three dots icon in right bottom of the Zonneplan card Click Reinstall Make sure Show beta versions is checked Select version main Click install and restart HA
So, I will await the results and report back to you.
See the instructions in the readme https://github.com/fsaris/home-assistant-zonneplan-one?tab=readme-ov-file#installing-mainbeta-version-using-hacs
Over the last couple of day ‘sensor.electricity_production_costs_today’ had a daily reset to zero as you intended. That also solved the issues I had with calculating net costs. Thanks @fsaris !
The value of ‘sensor.electricity_production_costs_today’ sometimes still has a value after 0:00 hours and then is unavailable until the energy production starts the next day. This behavior causes for instance a utility meter helper that is based on this sensor to start with the wrong value. Can you please make it behave just like it’s counterpart ‘sensor.electricity_delivery_costs_today’ and have a daily reset to zero at 0:00 hours?