Energy: Not showing the expected entities for consumption

Who can help me adjust my settings here? I’m really stuck for day now.
I just want my dashboard with energy meter showing in W instead of kW.
Also tried the tesla power card , but also no success…

This is my YAML configuration, and work fine for me.
In configure:

sensor:
    - platform: mqtt
      state_topic: 'Prosensor/energy'
      name: 'MQTT Sensor Wath'
      unique_id: "1_esp32_kwh"
      device_class: energy #power
      state_class: "total_increasing"  #measurement
      unit_of_measurement: kWh
      last_reset_topic: 'Prosensor/energy'
      last_reset_value_template: '1970-01-01T00:00:00+00:00'      

    - platform: integration
      source: sensor.mqtt_sensor_wath
      unique_id: "energy_kwh"
      name: energy_kwh

I am clueless what is going on in my configuration. I have two scrape sensors:

  1. from my inverter: (Energy income)
  - platform: "scrape"
    unique_id: "tarpit_sofar_inverter_shed_today"
    name: "tarpit_sofar_inverter_shed_today"
    authentication: "basic"
    username: "admin"
    password: "***"
    resource: "http://192.168.178.5/status.html"
    select: "script"
    index: 1
    value_template: '{{ (( value.split('';'')[6] ) | replace (''var webdata_today_e = '','''')|replace(''"'', '''')|float )}}'
    scan_interval: 300
    unit_of_measurement: "kWh"
    device_class: "energy"
    state_class: "measurement"
  1. my heat pump (Energy consumption)
  - platform: "scrape"
    unique_id: "tarpit_lwz_p_heizung_tag_scrape"
    name: "tarpit_lwz_p_heizung_tag_scrape"
    resource: "http://192.168.178.4/?s=1,1"
    select: ".value"
    index: 23
    value_template: '{{ value.replace("kWh", "").replace(",", ".") | float(default=0) }}'
    scan_interval: 60
    unit_of_measurement: "kWh"
    device_class: "energy"
    state_class: "measurement"

The first sensor shown up inside the energy dash board, the second does not.

inverter:

lwz: (heat pump)

I don’t understand the difference between these both sensors, can somebody help?

Thanks for this very helpful thread. I am getting an error from the dashboard regarding the units of my gas consumption sensor.

**Unexpected unit of measurement**
The following entities do not have the expected units of measurement 'Wh', 'kWh', 'MWh' or 'GJ' for an energy sensor or 'm³' or 'ft³' for a gas sensor: 
* sensor.gas_consumption_m3 (m³)

Below is the configuration for the sensor

template:
  sensor:
    - name: "Gas consumption m3"
      state: >
        {{ ((states.sensor.gas_meter_reading.state | float * 1 / 100)) * 1.012 * 2.8316846592 }}
      unit_of_measurement: "m³"
      device_class: energy
      state_class: measurement      
      attributes:         
         last_reset: '1970-01-01T00:00:00+00:00'  

I tried m3 M3 m³ with no success.