Energy Dashboard cannot add DSMR MQTT sensors

Struggle and attempt # 1.032 in getting my energy dashboard right. I added a P1 Smart gateway to my smart meter and have mqtt publish the sensors to home assistant. All good (loads of sensors out of the box), however there is a thing I simply do not understand. The sensor for gas usage can be added to the energy dashboard without any problem and it starts to spit out usage. Great!!
For electricity however the energy dashboard is telling me the 'statistics_not_defined" or “Entity not available”.

This happens for the sensors highlighted 2 and 3 below. I do not understand why the energy dashboard is refusing to see them. What do I miss, what am I doing wrong? Reading the forum over and over and over… I am lost, please help!
FWIW: no sensors for this are templated in the confoguration.yaml.

Because your sensors have not recorded any data and have an unknown state:

Right, that makes sense @tom_l thanks again!
Although I am a little bit puzzled now in what I see in MQTTanalyser and which sensors I get when using the dsmr mqtt integration. I added it using below in configuration.yaml an therefore I assumed all were mqtt topics, but the integration adds way more sensors than topics provided - including the empty ones I descried earlier.
My smart meter entry in configuration.yaml:

# Smart Gateways Slimme Meter WiFi Gateway
  - platform: dsmr_reader

And what I see in MQTTexplorer is below. The ones encircled however are not picked up by use of the integration, but do give me the correct values as far as I see. How could I add those as they do not exist in home assistant? I think some kind of sensor needs to be created? In configuration.yaml? So far I did not succeed in doing so in a correct way as my other post indicates :crazy_face:

Ignore the question about the encircled ones as I think they report as kW and not kWh, so useless for the energy dashboard.
However I am stillinterested how the other sensors are generated, that is the dsmr_mqtt integration I assume? And also: if there is a topic in mqtt, how could I create a sensor for that being total_increasing and kWh?

I used to work with domoticz and that is a dreal different way of working, using lots of dzvents scripting.

Yess, working!

Hi @erickranendijk , would you mind sharing your MQTT sensor setup for DSMR-reader?
Such a pity this basic functionality isn’t in the DSMR_reader integration in HA per default. Struggling with this for a while now.

1 Like

@vlamofiel the configuration.yaml entry is super simple. They’ll pop up automagically.

# Integratie via configuration.yaml Smart Gateways Slimme Meter WiFi Gateway
  - platform: dsmr_reader

Thanks for your reply Eric. I do have that in my code, but in my Energy Dashboard, HA seems to only select entities titled: sensor.dsmr_reading_electricity_delivered_1; which give an ‘unknown’. However sensor.dsmr_day_consumption_electricity2 does exist and contains data.
Do you happen to known if this is related to the MQTT settings inside DSMR-reader itself?

Hi @vlamofiel I do not know the insides, what I do know is there is a bunch of topics created and you need to check for your situation which can be used. The energy dashboard has some predefined filterin in it it seems which allows you to only pick the valid ones for the measurement. You can use a tool like mqttanalyzer to check what is spitted out.
Below a screenshot of some of the readings it delivers in HA: