Everything works as it should for me, except the cost sensors (automatically created by HA) which reset every now and then instead of always increasing:
Looks like (but I’m not sure) the _cost sensors reset when HA is restarted. The corresponding energy sensors behave as they should (always increasing).
Hi, I have published a new project that might be a nice complement to this Energy management dashboards. It is a project that I created using an optimization technique to maximize auto-consumption with PV+battery+hass. The topic can be found here:
But: My solar inverter delivers a daily value in 0.1 kWh increments / steps during the day, that is then retest on the next morning (starting again from 0). Between the actual inverter value and the integrated value there is a difference of around 0.3 kWh to 0.5 kWh per day …
Question: is there an easy way to have a “daily reset sensor” configured as an “total_increasing sensor”? If I use the “daily reset sensor”, there is a huge spike each morning (due to the reset on the following day)
I found it a little tricky as a template sensor is required so that all the required attributes can be set but the template sensor will be reset whenever there is a restart. So I use an input_number to hold the value for a restart and a python script to set the value of the template sensor.
Others reading this might have a more elegant/simple way to do this.
wow, this is exactly what Ive been looking for. Rephrase, what we all would be looking for. Not simply monitor the energy, but HA advising us on when to use and not to use, given several current and forecast parameters… great! I imagine this to be the way forward for the new HA Energy panel.
Have you already contacted the HA dev team on this? I would certainly hope so, and if not, please do. You could check in on Discord #dev_energy for starters.
Quick question. Does everything on the energy dashboard have to be in the same units or can I feed in some sensors in Wh and some in kWh and does the dashboard do a conversion for a common display?
Indeed. And that’s why I was asking to have a “daily reset sensor” configured / adapted into a "total_increasing sensor”. E.g. templating a 2nd sensor, that keeps the value over time… sorry if I was being unspecific…
Ah. I don’t know. But Home Assistant should work with your resetting sensor so it might be better to focus on getting that fixed instead of looking for a workaround.
The “daily reset sensor” does work (sort of) and I can use it to configure the solar production.
But: The sensor value is increasing during the day and stays on a final daily value once the sun sets - the value of the sensor now stays on that value until the next morning once the inverter is powered on again (and then starts from 0), resulting in a huge spike in the energy dash board on that following day (the spike with the solar production of the day before). See also: Energy Management in Home Assistant - #392 by JayTee75 (and the following answers).
Or are there better solutions than using a “total_increasing sensor”?
Thank you! I’d like to have a HA solution without relaying on an external script though maybe set the value via automation?