My total energy cost stays at 0 after changing currency from EUR (default) to CZK. I was told on Github to reset the stats but have no idea how? Looked around but my cost sensor does not have last_reset property.
Please help, thanks.
My total energy cost stays at 0 after changing currency from EUR (default) to CZK. I was told on Github to reset the stats but have no idea how? Looked around but my cost sensor does not have last_reset property.
Please help, thanks.
Is the sensor included in the recorder?(použil jsem fixnà cenu a funguje,počkej nějakou hodinu)
Yes it is. The monitoring device does monitor properly and it does have the “energy:” attribute that increases, just the Total is not calculated.
I have set it two days ago, cost still at 0.00. A dĂk za tip
I was told to manually edit the MariaDB database but that’s just too much for me, I won’t learn the intricacies of database work to reset a stat.
It’s pretty simple.
Install the phpMyAdmin addon.
Start the addon and open it’s web page.
In the left hand column select the homeassistant statistics_meta table. Then select the SQL tab up top:
Paste this query into the text box overwriting the default query that is in there already:
UPDATE statistics_meta SET unit_of_measurement = "ILS" WHERE statistic_id = "sensor.3em_channel_a_energy_cost";
Replace ILS with the unit you want and replace the sensor with your sensor that needs changing. Test the query to see what it will do, if you are happy, press Go. This is what I used ro change one of my sensors to AUD:
You can stop the addon after this if you wish (probably best not to leave it running).
There will hopefully be an easier way to do this in a future release.
Thank you so much!
Hmm, I did that several hours ago, rebooted the whole thing but the cost is still stuck at zero. Is there a way to zap the whole Energy thing and start over?
BTW Energy UI tells me " Unexpected state class. The following entities do not have the expected state class 'total_increasing
'" but whem I look at that entity, it definitely does:
state_class: total_increasing
unit_of_measurement: CZK
friendly_name: sensor Cost
device_class: monetary
To reiterate: Energy monitoring did work until I changed the Currency in General settings. Since then, Cost is stuck at 0.00, even after modifying the database with MyPHPAdmin.
Same problem here. I change from Euro to USD and it broke the cost calculations due to the history data.
The error message is: * The unit of sensor.zw_node_5_electric_consumed_kwh_a_cost (USD) 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. Go to Link to Developer Tools: Statistics – My Home Assistant to fix this.
I don’t want to change back to EUR. I want USD. I have deleted the energy configuration and reconfigured but it has the same error. Seems like I need to delete the energy history but I don’t know how to. The error message URL does not work for me.