Tuya energy meter not showing kWh reading

My Tuya based energy meter does not show kWh readings in HA, while it shows that value in the Tuya app.
Any ideas on how to get that value in HA, and add it to the energy dashboard ?


In HA I get this

And this is what I get when I click on "download diagnostics¨

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.12.3",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.11.6",
    "docker": true,
    "arch": "armv7l",
    "timezone": "Europe/Brussels",
    "os_name": "Linux",
    "os_version": "6.1.63-haos",
    "supervisor": "2023.11.6",
    "host_os": "Home Assistant OS 11.2",
    "docker_version": "24.0.7",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "jq300": {
      "version": "0.10.6",
      "requirements": [
        "paho-mqtt==1.6.1"
      ]
    },
    "thermal_comfort": {
      "version": "2.2.0",
      "requirements": []
    },
    "sunnybeam": {
      "version": "0.1.1",
      "requirements": [
        "sunnybeamtool>=0.1.0"
      ]
    },
    "sonoff": {
      "version": "3.5.2",
      "requirements": [
        "pycryptodome>=3.6.6"
      ]
    },
    "hacs": {
      "version": "1.33.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "smart_thermostat": {
      "version": "2021.11.1",
      "requirements": []
    }
  },
  "integration_manifest": {
    "domain": "tuya",
    "name": "Tuya",
    "codeowners": [
      "@Tuya",
      "@zlinoliver",
      "@frenck"
    ],
    "config_flow": true,
    "dependencies": [
      "ffmpeg"
    ],
    "dhcp": [
      {
        "macaddress": "105A17*"
      },
      {
        "macaddress": "10D561*"
      },
      {
        "macaddress": "1869D8*"
      },
      {
        "macaddress": "381F8D*"
      },
      {
        "macaddress": "508A06*"
      },
      {
        "macaddress": "68572D*"
      },
      {
        "macaddress": "708976*"
      },
      {
        "macaddress": "7CF666*"
      },
      {
        "macaddress": "84E342*"
      },
      {
        "macaddress": "D4A651*"
      },
      {
        "macaddress": "D81F12*"
      }
    ],
    "documentation": "https://www.home-assistant.io/integrations/tuya",
    "integration_type": "hub",
    "iot_class": "cloud_push",
    "loggers": [
      "tuya_iot"
    ],
    "requirements": [
      "tuya-iot-py-sdk==0.6.6"
    ],
    "is_built_in": true
  },
  "data": {
    "endpoint": "https://openapi.tuyaeu.com",
    "auth_type": 0,
    "country_code": "32",
    "app_type": "smartlife",
    "mqtt_connected": true,
    "disabled_by": null,
    "disabled_polling": false,
    "name": "meter-airco",
    "model": "DDS238-2 WIFI",
    "category": "cz",
    "product_id": "sw9asyjj8j44frjl",
    "product_name": "meter",
    "online": true,
    "sub": false,
    "time_zone": "+01:00",
    "active_time": "2022-04-27T16:51:07+00:00",
    "create_time": "2020-10-10T15:43:47+00:00",
    "update_time": "2023-12-17T23:06:39+00:00",
    "function": {
      "switch_1": {
        "type": "Boolean",
        "value": {}
      },
      "countdown_1": {
        "type": "Integer",
        "value": {
          "unit": "s",
          "min": 0,
          "max": 86400,
          "scale": 0,
          "step": 1
        }
      }
    },
    "status_range": {
      "switch_1": {
        "type": "Boolean",
        "value": {}
      },
      "countdown_1": {
        "type": "Integer",
        "value": {
          "unit": "s",
          "min": 0,
          "max": 86400,
          "scale": 0,
          "step": 1
        }
      },
      "cur_current": {
        "type": "Integer",
        "value": {
          "unit": "mA",
          "min": 0,
          "max": 100000,
          "scale": 0,
          "step": 1
        }
      },
      "cur_power": {
        "type": "Integer",
        "value": {
          "unit": "W",
          "min": 0,
          "max": 500000,
          "scale": 1,
          "step": 1
        }
      },
      "cur_voltage": {
        "type": "Integer",
        "value": {
          "unit": "V",
          "min": 0,
          "max": 5000,
          "scale": 1,
          "step": 1
        }
      }
    },
    "status": {
      "switch_1": true,
      "countdown_1": 0,
      "cur_current": 167,
      "cur_power": 123,
      "cur_voltage": 2388
    },
    "home_assistant": {
      "name": "meter-airco",
      "name_by_user": null,
      "disabled": false,
      "disabled_by": null,
      "entities": [
        {
          "disabled": false,
          "disabled_by": null,
          "entity_category": null,
          "device_class": null,
          "original_device_class": "current",
          "icon": null,
          "original_icon": null,
          "unit_of_measurement": "A",
          "state": {
            "entity_id": "sensor.meter_airco_current",
            "state": "0.167",
            "attributes": {
              "state_class": "measurement",
              "unit_of_measurement": "A",
              "device_class": "current",
              "friendly_name": "meter-airco Current"
            },
            "last_changed": "2023-12-18T19:22:52.070795+00:00",
            "last_updated": "2023-12-18T19:22:52.070795+00:00"
          }
        },
        {
          "disabled": false,
          "disabled_by": null,
          "entity_category": null,
          "device_class": null,
          "original_device_class": "power",
          "icon": null,
          "original_icon": null,
          "unit_of_measurement": "W",
          "state": {
            "entity_id": "sensor.meter_airco_power",
            "state": "12.3",
            "attributes": {
              "state_class": "measurement",
              "unit_of_measurement": "W",
              "device_class": "power",
              "friendly_name": "meter-airco Power"
            },
            "last_changed": "2023-12-18T19:23:51.908323+00:00",
            "last_updated": "2023-12-18T19:23:51.908323+00:00"
          }
        },
        {
          "disabled": false,
          "disabled_by": null,
          "entity_category": null,
          "device_class": null,
          "original_device_class": "voltage",
          "icon": null,
          "original_icon": null,
          "unit_of_measurement": "V",
          "state": {
            "entity_id": "sensor.meter_airco_voltage",
            "state": "238.8",
            "attributes": {
              "state_class": "measurement",
              "unit_of_measurement": "V",
              "device_class": "voltage",
              "friendly_name": "meter-airco Voltage"
            },
            "last_changed": "2023-12-18T19:41:48.818025+00:00",
            "last_updated": "2023-12-18T19:41:48.818025+00:00"
          }
        },
        {
          "disabled": false,
          "disabled_by": null,
          "entity_category": null,
          "device_class": null,
          "original_device_class": "outlet",
          "icon": null,
          "original_icon": null,
          "unit_of_measurement": null,
          "state": {
            "entity_id": "switch.meter_airco_socket_1",
            "state": "on",
            "attributes": {
              "device_class": "outlet",
              "friendly_name": "meter-airco Socket 1"
            },
            "last_changed": "2023-12-18T00:13:50.828782+00:00",
            "last_updated": "2023-12-18T00:13:50.828782+00:00"
          }
        }
      ]
    }
  }
}

You need another sensor (add-ele)
Im not familiar with Tuya, as i use Local-Tuya, but if you can edit device,

Try to:

Add DP_ID 17

Scale :3 … most likely