I have added a static cost into the Energy dashboard for Electricity (0.33 GBP/KwH) but it doesn’t calculate the cost correctly - calculates £99 instead of about £12. Can this be fixed?
Home assistant does not currently support daily fixed charges. You can vote for the feature to be added here: Energy fixed costs
Thanks for the reply. Sorry I am a bit confused. In the Energy dashboard, one of the options is to add a static cost price to the electricity consumption. Are you saying this doesn’t work?
Sorry I thought you meant a fixed daily cost.
The static cost per kWh should work.
Ok. Any ideas why the math seems to be wrong then? Does the dashboard struggle with the fact that it is small decimal cost that is less than 1? (e.g. 0.33 GBP)
I use costs as low as 0.08 $/kWh and it works fine. However I store my costs in input numbers (so I can change them easily from the frontend) and use the “Use an entity with current price” option.
Thanks. Very odd. Do you mind sharing your code on how you do this and I can try and emulate?
It’s just an input number helper.
t93_peak_energy_cost:
name: T93 Peak Energy Cost
mode: box
min: 0.00000001
max: 100.00000001
unit_of_measurement: "$/kWh"
icon: mdi:currency-usd
Thanks again. I have got this to report correctly but I think there is some residual costs from previous incorrect prices that is inflating the price. Do you have any idea where this is stored so I could correct this?
Developer Tools → Statistics. Click on the ramp icon to the right of the entity.
Also fix any issues HA finds there.
Thanks vey helpful. Do you know if there is a way to import data rather than use the statistics page?
I have fixed incorrect values on Developer Tools → Statistics, and this corrects the graphs immediately, but the price calculation remains wrong. How can I ask it to re-calculate the cost?
Struggeling with the same issue, did you find any solution?
Deleted my post as I realised HA had been switch off over night for the last few nights, so the first recording would include the over night usage, which probably messed up the calculation… If I scroll back similar (usage) days would calculate the correct cost… So I ignore my post.
Sorry to highjack this thread.
But I have pretty much exactly this problem and can’t find out how to fix it.
On January 7 in my energy tab. The price is €20191.47 for 33.43kwh. the values on the consumption sensor are correct. No outliners. The fixed price is 0.41€ and every other day is correct. I’ve looked through the statistics table to find anything but all the values seem to be correct.
It might have been exactly the date I switched my server. But since the values are all correct I can’t figure out where the 20k€ come from…
Maybe someone can lead me to the error?
Okay, wow. I just fixed it.
For anyone stumbling across this.
I solved it By adjusting the outlier on the sensor with _cost at the end in developer tools, statistics.
I did not know this sensor existed.
I’m also facing readings on the energy dashboard that can’t be right. Prices are dynamic and read by the EPEX Spot integration as Net Price sensor. This sensor is configured for the current price.
On the current day, the price chart shows prices between 0.33 and 0.37 €/kWh. The consumed energy is 0.87 kWh. This means the costs should be between 0.29 and 0.32 €. However, the energy dashboard shows 0.10 €.
Any idea what could be wrong or how to capture additional data that explain the calculations?
Ok, I might have done something wrong. Maybe inadvertently made some change to the dashboard configuration. I manually calculated the hourly costs for one day and the sum was the same number as on the energy dashboard.