(Solved) Sinope TH1124ZB-G2 How to add right value for the energy dashboard

Hi.
My thermostat give me Kw/h but the value is not compatible with HA.
It report 1813427 kWh witch is really 1813.427 Kw/h. So when there is a consumption of something like 350 Wh, the next report add 350 Kw\h. How can I add the decimal dot so that HA can report the good value or change the reporting value in Wh

The thermostat is zigbee with zigbee2mqtt without the Neviweb app and gateway. Running it on a sonoff and everything works fine. Made a automation to get the kw/h refresh every 5 minutes and one to set the outside temperature.
I Want to intégrate this to the energy dashboard but with value like this it doesn’t work

If the value reported is wrong, first thing to do is file an issue with the component maintainer.

If you’ve done that and are sure no fixes are forthcoming, I would make a template sensor which divides by 1000, and assign that the correct unit. Then you can ignore the faulty sensor, and use your template sensor in its place for all other purposes in HA, and it will be correct.

Thanks a lot for the response. I manage to make it work with a template.

template:
  - sensor:
      - name: "Salon_KwH"
        unique_id: 6018fcf2-ccfa-4b9e-b5a5-244d260e2a72 
        state: "{{ states('sensor.0x30fb10fffe4646e3_energy') | float(0) / 1000000 | round(3) }}"       
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing

Recommend don’t use float(0), or anytime the source sensor goes unavailable you’ll get a bad glitch in the dashboard. Use an availability template instead.

ok thanks I removed the float(0) and it still work

template:
  - sensor:
      - name: "Salon_KwH"
        unique_id: 6018fcf2-ccfa-4b9e-b5a5-244d260e2a72 
        state: "{{ states('sensor.0x30fb10fffe4646e3_energy') | float / 1000000 | round(3) }}"       
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing

Had to divide by 1000000 to get the right number :slight_smile:

Well All my other thermostat works with divide by 1000, deleted the different one and reconfigured it and is now divided by 1000.

template:
  - sensor:
      - name: "Salon_KwH"
        unique_id: 6018fcf2-ccfa-4b9e-b5a5-244d260e2a72 
        state: "{{ states('sensor.0x30fb10fffe4646e3_energy') | float / 1000 | round(3) }}"       
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing