Entity not listed in the energy dashboard

Continuing the discussion from Energy consumption entity not listed:

Hi All,
Got an issue that as usual many guys faced… Energy entity not listed in the energy dashboard.
I keep trying this for last couple of days, it came one time, then I tried to modify the code in ESP, then the energy sensor vanished in energy dashboard again.
Can any one please explain clearly what i need to do here? Please dont say device_class : enery and all.
You can see my developer tool shows all attributes , attached in the picture.

You did not attach a picture.

Also please don’t attach a picture. Copy and paste the attributes here. Then correctly format them.

Below is the attribute for sensor.total_daily_energy

state_class: total_increasing
unit_of_measurement: Wh
device_class: energy
icon: mdi:flash-circle
friendly_name: Total Daily Energy

below is another sensor ---- sensor.total_daily_energy_2
state_class: total_increasing
unit_of_measurement: kWh
device_class: energy
friendly_name: Total_Daily_Energy

You have not scrolled down far enough in the sensor selection list on the energy dashboard setup page.

I can only see sensor.p... when your sensors start with sensor.t...

Because there is no sensor in that. I checked

Have you checked developer tools > statistics for errors?

Really thanks mate.
I did fix now and it is in the energy dashboard list atleast now.
however, it says, “statistics_not_defined”.

Can you please look at this. i am new to HA and not code writer.Statics not defines

Might need to wait a little while til statistics get created. give it an hour or two.

I think, you solved it man, great.
Just fixed some of the other unavailable enitities in same developer tool statistics.
great and thank you so much.

Just a question again, ithat developer statistics solve the issue itself?


sorry i do not understand the question

I just clicked statistics “fix now” button. It automatically changed the unit of measurement and then i can easily see the the entity listed in dashboard. So, i did not change any code or anything. So, Statistics does this automatically ?

Yes it is automatic as far as the unit of measurement being changed in the database.
From what you are saying it sounds like in the statistics database it had a different unit of measurement than what it should have, but now it is fixed.

Yes. Infact i keep changed the unit of measurement kWh, W, Wh all in ESP YAML code. It did not work. Also, the develope tool states shows all good. But it was not working for me.
I have no idea about the statistics tool.

Thank you.

Yes because the entities themselves are valid and working fine.

The statistics are the long term database entries so when you change an entity it can cause a mismatch between new and old data which you need to resolve like that.

1 Like

Hey, I was wondering if anyone could point me in the direction of how I can create a dashboard like the one shown in the documentation.

Currently, I am trying to use the default energy dashboard.

I have had HA for one week now and need a bit of guidance.