Need help with energy dashboard

Hello,

I have this sensor from my energy meter that is relayed to HA via MQTT. While I can see the sensor and the history, I can’t for the life of me figure how to have it show up in the energy dashboard. All I see is the dreaded “No matching statistics found”.

Here is the sensor in config.yaml. What am I doing wrong?

Would appreciate some help here.

Thanks!

mqtt:
  sensor:
    unique_id: house_power_consumption
    name: power consumption
    state_topic: "Instant power consumption"
    state_class: total_increasing
    device_class: energy
    unit_of_measurement: 'kWh'

Ok, I figured it out finally, with the help of that thread.