How to configure a Sensor so that is useable in in the energy Dashboard

Ok, got it working. In case somebody else uses KNX sensors and can’t figure this out:

knx:    
  sensor:
    - name: "Haus Zählerstand Bezug"
      state_address: "13/4/31"
      type: active_energy_kwh
      state_class: total_increasing
      
    - name: "Haus Zählerstand Einspeisung"
      state_address: "13/4/32"
      type: active_energy_kwh
      state_class: total_increasing
      
    - name: "Gas Zählerstand m3"
      state_address: "13/5/0"
      type: volume
      state_class: total_increasing


homeassistant:
  customize:
    sensor.gas_zahlerstand_m3:
      device_class: gas
      unit_of_measurement: "m³"


Now you can use the Entities in the configuration for the energy dashboard. After some minutes you’ll see the dashboard populate.

Have a great weekend
Cu
Frank

ps: unfortunately, for GAS you can only use “m³” (be sure to not use “m3” instead) but not kWh, as we pay for gas in €/kWh and the calculation factor between m³ and kWh is slightly different in every area.