Trying to display water sensor in Energy Dashboard

I am sorry, I know this specific question has been asked numerous times before. I did try to compare my code with other existing posts, but can’t get it to work.

template:
  - sensor:
      - name: watermeter_toonwater
        unique_id: watermeter_toonwater
        device_class: water
        unit_of_measurement: "m³"
        state: >- 
          {{states.sensor.watermeter.attributes["waterquantity"] |float /1000}}
        state_class: total_increasing

I also tried unit_of_measurement: m³ (without the double quotes), doesn’t help.

I think this sensor is ticking all required boxes to show in the Enery Dashboard and listed under water sensorsm but it doesnt. Below is a screenshot of the entity state, please help :frowning:

If anyone else has this problem in the future, here’s how to fix it.

I was not sharp when creating the yaml code. Because of this I had copied the incorrect value (mó) instead of m³. What happened then, in recorder that it remembers the wrong value even though you adjust it in yaml. Under developer-tools/statistics you will see that the old value is remembered and that it has a new value. But not automatically converted. That’s why, when you click on fix issue, HA then adjusts it in the recorder database. After that it worked fine :slightly_smiling_face: