I noticed my cost calculation in Energy Dashboard stopped working as soon as I upgraded to 2021.9 as shown in the image below:
This feature was previously working fine in 2021.8.
I did some troubleshooting and found out why.
This is a post mortem of how the issue was caused and how I fixed the issue.
How the issue was caused:
When Energy dashboard launched in 2021.8, I had not yet changed my currency from the default EUR under Configuration / General / Currency.
My local currency is AUD.
When long term statistics was initialized in 2021.8, Home Assistant assigned the current currency value to Energy Dashboard which was EUR at the time.
Once I noticed the EUR symbol in Energy Dashboard, only then did I take steps to change the currency to AUD.
Changing the setting was easy enough and had an immediate impact on the currency smybol displayed in the Energy Dashboard.
Once 2021.9 came out, Energy Dashboard noticed that the EUR unit was not the same as my current currency of AUD and decided to stop recording costs all together.
I can understand why, because the units need to match in order for calculations to continue.
How I verified the issue:
Installed this
How I installed it
Supervisor / Add-on Store / SQLite Web / Install / Run / Open Web UI
Once running, I did this:
statistics_meta / Query
SELECT *
FROM "statistics_meta" where unit_of_measurement = 'EUR'
Thanks for this post, I had exactly the issue you described and have been trying many things to resolve it, updating the entry as you described sorted it.
One addendum that I did was to remove all the stats generated to date on that stat ID, because it’s been nearly two months since this stopped working I suspect that the yearly cost stats would be completely wrong so may as well start again.
Hard to say as it depends on exactly what issue the fix issues button fixes?
Did you take notice before pressing it?
In my picture example above, my issue was that I was excluding certain entities from the recorder. Pressing the fix issue in that case would not fix the energy dashboard for me
Thanks for this post, I got into the same issue with the same steps. The Fix Issue button changed the historical EUR amounts to AUD; for me this made the cost of imports & exports since I switched to AUD suddenly show up as today’s costs, then accounting resumed successfully the next day.