Home Assistant is very powerful and does a great deal.
If there was one thing I would really like to change, it would be to rename the âUtility Meterâ integration / sensor to something else - Billing Account Record (BAR) as a suggestion.
Naturally everyone thinks it is a utility meter - it takes in something and shows a dial like the one in the house, that constantly updates to show how much you have used. WRONG.
It is an accounting recorder. Much as any accounts, there is a âcut offâ at which point everything processed is added to the daily/monthly bill. Other items (usage) may still be pending but not yet added. Just like my monthly accounts for my credit card, my accounts program holds the last reconciled date, and the last reconciled figure. What my credit card company charge me each month is not what I have spent on the card between the dates, but what has gone into the accounts between the billing dates.
The whole âpower - energy - utility meterâ business is a constant source of âfunâ and yes perhaps someone should write a big warning, and a big explanation. [I think they already have, and not everyone learns by reading the manuals first, and naturally as this is open and community, anyone can volunteer to write something âŚ]
Now, if you had asked âhow do I get a daily utility meter to record my use between midnight to midnightâ that would be a different question.
Since HA is economical, it only captures and records state changes. Which are then used by the Reimann integration. Which is then used by the Utility meter.
What you really want is for the Reimann sensor to update just before midnight with the energy used, so that the daily utility meter will show the âcorrectâ full daily used energy. This requires HA to record the power state change at midnight, in this case from 1800 down to 0 (which then triggers the update of the energy sensor).
If you held the power sensor value at zero over midnight, it should all work as you want. This can be done by either turning the HotWater system off at 23:59 (and back on again at 00:01 if required) or by setting up a virtual power sensor that does the same for you, without actually turning the hot water off.
Say you had a HWPower sensor, that used the power sensor you already have, but forced or set the state value to 0 for one minute before midnight. This is not something I have tried, but I think could be done with a template sensor that matches the power sensor value, except for one minute to midnight when it returns 0. âVirtualâ power goes to 0, energy sensor updates, utility meter records the actual day use. Simple.
Edit - suggestion:
New template sensor, using the base power sensor you have, and the time integration sensor (which you may need to add - gives local time âhh:mmâ updated every minute).
{% if states('sensor.time') != "23:59" %}
{{states('sensor.mb_solar_power')}}
{% else %}
0
{% endif %}
to create a âvirtualâ power sensor, used in the Reimann integration, which will cause an update of the power value at 23:59 in time for the daily utility meter reset.