i upgraded my HA Docker installation this morning to 2022.2.0.
Since then my Energy Dashboard is empty.
Grid neutrality could not be calculated
Self-consumed solar energy couldn’t be calculated
Consumed non-fossil energy couldn’t be calculated
Developer Statistic has Errors
Entity has no state
This entity has no state at the moment, if this is an orphaned entity, you may want to remove the long term statistics of it from your database.
Do you want to permanently remove the long term statistics of sensor.e3dc_string_1_power from your database?
Did re-select the entries and saved the energy configuration.
I am quite lost i have to confess.
Any help much appreciated.
Please show all the attributes ot your E3DC sensors, use dev tools and post a screenshot so the attributes of all of them are visibile, I want to see state_class and device_class of each of them.
I use HA container too, and upgraded to 2022.2 (now 2022.2.2) with no issues. I’m pretty confident it’s something related to how you configured your sensors + something that changed in 2022.2.
Probably you’re using state_class: measurement instead of using state_class: total or state_class: total_increasing. Remember that measurement is for power or instantaneous measurements, the Energy integration needs energy sensors. But I thought I already discussed all this with you some months ago.
Good morning Gentlemen, first of all. Thank you for your help! Much appreaciated!
Here are the sensors which stopped working showing “0”.
I will wrap up the solution after i figured it out on how to fix it.
E3DC Battery Negative (Dischagre) Power
friendly_name: E3DC Battery Negative (Dischagre) Power last_reset: 1970-01-01T00:00:00+00:00
device_class: power state_class: measurement
Looks as the power sensors stopped counting while the energy sensors look OK.
E3DC Solar Energy state_class: measurement
friendly_name: E3DC Solar Energy last_reset: 1970-01-01T00:00:00+00:00
Alex, Michael → you guys rock! → Thank you for pointing this out!
The change from state_class measurement to total_increasing fixed the issue for me.
Energy Dashboard stopped working after upgrade to 2022.2.0
Sensors on Energy dashboard were not calculated anymore and dashboard was empty.
Change Energy sensor states from state_class measurement to total_increasing.
Keep Power sensor states with measurement
Remove last reset state
A. Web GUI - Developer Tools - State
B. Change in customize_global.yaml. Save and restart HA.
# General customization for power sensors
# Set class to power and enable statistic
# OLD / BACKUP - state class and last reset removed
# last_reset: '1970-01-01T00:00:00+00:00'
# device_class: power
# state_class: measurement
I hope you now understood that measurement is used for power and total or total_increasing is used for energy.
I see a problem on your sensors: they are all named “power”, you need to distinguish between the power sensors and the energy sensors, and the names should reflect that. If you use the integral to calculate energy from power sensors, name the calculated sensors accordingly, otherwise you will make mistakes in the future and debugging problems becomes more difficult. Keep it clean and simple, the more you do it, less problems you’ll have in the future.
On energy sensors you should have:
state_class: total or total_increasing (read the article I linked you in previous post)
last_reset should not be there, unless you have specific requirement, and only for `total`: `total_increasing` MUST NOT HAVE the `last_reset`, because it's supposed to be an ALWAYS INCREASING sensor.
This is how I created my power/energy sensors, Node-Red pulls data from my meter and creates the sensors in HA with the proper attributes see the difference of the attributes between the power sensor and the energy sensor below:
one last thing: read carefully in the link provided the difference between total and total_increasing, it’s very important. Everybody is following the flow using total_increasing, without paying attention to the fact that total_increasing implies that the sensor NEVER goes to 0. If it does, for whatever reason (disconnections, etc.) you can have strange results. So read the docs and analyze your specific needs.
I changed this in the configuration file for my solar panel which comes by MQTT, but I stil have problems with the energy meter Shelly EM3. These measurements comes from the "home assistant shelly integration".
Where do I change the device_class and state_class for devices in the Shelly integration?
So my solar production and the returned energy is recorded. I am using a Shelly 3EM to measure incoming and outgoing energie on the entrance of the grid.
This is the configuration. I just used the shelly integrations parameters.
The “Black/Brown/Grey Energy Returned” sensors have this config
The "“Black/Brown/Grey Energy” sensors seems to have a different config with the old “state_class” measurement
I tried to change it on this field, and click on the set button, but the change is not kept.
Is there a procedure to change the “entity states”?
I also do not understand why some sensors are updated and some are not. All sensors are in the “official Shelly integration”
Core 2022.2.3 Using Windows 10 logged into my Home Assistant Host through xxxx.ui.nabu.casa…(Home Assistant Cloud)
Having the exact same issue as ‘cvhoutvi’. I can delete the prior sensor (energy total) and can click on arrow to bring up drop down menu. But cannot select from that menu nor use the right slide bar to move the menu items. I tried doing a cut and past of the correct sensor name but would not allow save after the paste action. I then tried deleting my Phase 0 and Phase 1 grid sensors and starting over. Same issue. Will now try a restart of Host and see if that helps.
Rebooting Home-Assistant did not help. Then tried using my Iphone 11-ProMax through Home Assistant App. via Home Assistant Cloud as above. All editing of Energy Dashboard worked without issue.
Then went back to my Windows 10 computer (latest version and update) and had the same issue. No control of drop down menu items and unable to edit Energy.)
While I have deleted all grid and individual energy sensors (energy_total) and added them all back (energy_today). No data (or errors) have showed up in the Energy Dashboard yet. Waiting the 2 hours now.
Chris, you are customizing Shelly’s sensors, and they don’t require ANY customization.
The Black/Brown/Grey Energy sensors have a wrong state_class. Shelly Integration DOES NOT use that state_class for energy sensors. I don’t know what integration you are using, but if it’s the OFFICIAL one, it means you are also using customize: to change the attributes, and that is wrong with the official integrations. So be sure to delete all customizations or double-check you are actually using the official shelly integration.
Try to remember what you did to customize those attributes…and undo that.
These are some of my shelly EMs, without any customizations, look at the attributes: