Shelly Wrong unit_of_measurement

Hi, On all my Shelly units the unit of measurement is wrong it shows kWh and the unit should be showing in W, when I change it in core.entity_registry it changes bach when i have restarted the Home Assistant, what can I do to make it right?

{
        "area_id": null,
        "capabilities": {
          "state_class": "total_increasing"
        },
        "config_entry_id": "a9feda304ebcca69d3992aa8c89a88e8",
        "device_class": null,
        "device_id": "bf4c9ea51ff5f94162c3509503ed900d",
        "disabled_by": null,
        "entity_category": null,
        "entity_id": "sensor.it_energy",
        "hidden_by": null,
        "icon": null,
        "id": "edc80d9d8e1d8e64db0d006fcc0514c4",
        "has_entity_name": false,
        "name": null,
        "options": {},
        "original_device_class": "energy",
        "original_icon": null,
        "original_name": "IT Energy",
        "platform": "shelly",
        "supported_features": 0,
        "unique_id": "7C87CE658AD4-switch:0-energy",
        "unit_of_measurement": "kWh"
      },

The config you posted is for an energy sensor. Energy is measured in Wh or kWh.

Power is measured in W or kW.

Thanks.
Can I change the discovery configuration mode for the Shelly so that it appears correctly.

It is already correct if it is an energy sensor.


It should only show Watt in sted of kWh

That is not the same entity that you posted the config for in your first post. The entity you posted the config for has the name:

"original_name": "IT Energy",

The one in your graph is called IT Power.

And it has a lot more wrong with it than the unit if it is a power sensor instead of an energy sensor. e.g.

 "state_class": "total_increasing"
"entity_id": "sensor.it_energy",
"original_device_class": "energy",

How are you adding these sensors?

Sorry, I have two sensors and it is Shelly switch and it is autodiscovery I down´t put them in manuel.
It looks like that it has W as it should, but it shows kWh as you can see.

      {
        "area_id": null,
        "capabilities": {
          "state_class": "measurement"
        },
        "config_entry_id": "a9feda304ebcca69d3992aa8c89a88e8",
        "device_class": null,
        "device_id": "bf4c9ea51ff5f94162c3509503ed900d",
        "disabled_by": null,
        "entity_category": null,
        "entity_id": "sensor.it_power",
        "hidden_by": null,
        "icon": null,
        "id": "215832915d4920ffbe8638f92450f369",
        "has_entity_name": false,
        "name": null,
        "options": {},
        "original_device_class": "power",
        "original_icon": null,
        "original_name": "IT Power",
        "platform": "shelly",
        "supported_features": 0,
        "unique_id": "7C87CE658AD4-switch:0-power",
        "unit_of_measurement": "W"
      },