[Solved] Energy cost not calculated

With the latest 2021.8 energy, i’m not able to get the cost:
I’ve configured the price:

But it always appears as 0:

Do you know what is wrong?

Thanks!

Try using only 2 decimals (when you adjust the costs using the up/down arrows HA will notify you about the incorrect value)

When you save the (rounded) costs and wait a few hours, costs should appear

1 Like

I did nothing and it started to work :\

however the price shown currently not correct… i’ve update today the consumption sensor, so might be it affected. will see tomorrow if it works correctly…

So checked back today and all looks correct:

1 Like

not sure whence you got this suggestion, but I don’t believe this is true, based on the fact my own config uses 5 decimals, an works just fine.

So unless confirmed by the dev team, we should not advise this as solution for anyones Cost issues in the Panel.

The solution checkbox should be cleared until that moment.

1 Like

hey

i just notice that i have the same problem since earlier this month (since the 3rd, which is the same day i updated to 2021.9.1)
i cant say that thats the reason (cause i just noticed it today), but thats when my “energy costs” disappeared…

any idea what needs to be done to fix this?
(im running latest version 2021.9.5)

update:
Deleting the cost, restarting HA, re-entering the costs and another restart - fixed it for me.
have zero idea why, but it worked.
ps.
i noticed that as radinsky did - i also changed the default curacy. not sure if this helps out in anyway, but i’ll leave it here in case anyone else might find it useful
cheers

I have the same issues since last update. The cost sensors are not updating anymore even if my configuration seems to be correct. I have already followed the instructions to the letter, but no cost is visible since a good week of waiting.

I have the same problem. What’s the fix since this is solved?

Same issue here. Moreover not sure if I have to use comma or dot for decimal separation.
Any idea?

Same here, I tried to remove, restart, set the price (0.1337€) and restart but same issue.

I agree, please remove the solution checkbox !

1 Like

Yes, I have the same problem - no cost calculation and cost always shows zero. I have tried to enter anything from a 2 decimal point number to a 6 decimal point number in “Use a static price”. I also tried using an input boolean to enter my current cost/kWh in “Use an entity with current price”. Nothing works. I’m pretty sure it WAS working just after initial installation of the Energy module, until I changed my currency setting to USD. Others have reported this failure mode.

I have the same issue as well - initially it was working with 3 decimal places, but saw a note in a log that the price wasn’t valid. Changed to a 2 decimal cost and left over a week with a few restarts and still the same.

Also tried using integer number (1) without any decimal and separator, and no cost is calculated.

Hey guys I managed to make it work. You need to record the cost sensors, otherwise it will stay at zero. Since I added the sensor.xxxxxx_energy_cost in my recorder, everything gets calculated

1 Like

Same here, did work but stopped working since a few days. Both Gas and Energy.
Also tried changing to 2 decimals.
First calculation was incorrect and next days costs remain 0
image (2021-10-09)
1 m3 = €0,82 in my case so this should be €2,173

Still no solution?

I had the same problem.
It started to happen after one of the updates…

I noticed these errors in the log:

2021-10-07 15:16:43 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.shellyem3_e8db84d72667_channel_a_energy_cost (ILS) does not match the unit of already compiled statistics (EUR). Generation of long term statistics will be suppressed unless the unit changes back to EUR
2021-10-07 15:16:43 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.shellyem3_e8db84d72667_channel_b_energy_cost (ILS) does not match the unit of already compiled statistics (EUR). Generation of long term statistics will be suppressed unless the unit changes back to EUR
2021-10-07 15:16:43 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.shellyem3_e8db84d72667_channel_c_energy_cost (ILS) does not match the unit of already compiled statistics (EUR). Generation of long term statistics will be suppressed unless the unit changes back to EUR

So I went to “Developer Tools → Statistics” and noticed there is a “FIX ISSUE” next to these entities.

fixed the issue and now it’s working

7 Likes

Fixed in 2021.10 - developer tools + statistics. You can see which ones need to be fixed. Pressed this and the next day it’s working again.

1 Like

I have not set a sensor for the cost, so nothing to be fixed. What should I do in this case?