GOSUND smart plug installation

I have some GOSUND smart plugs which. These plugs are not based on ESP.
I tried to get them in to the integrated energy management overview.

1st Problem:
The power usage in the TUYA integration is wrong, Its 10times higher than in reality and in the TUYA app

2nd Problem:
you don’t get the energy usage data in kWh for the energy management overview.

This was my way to fix it, maybe there are others around?

  1. make it available in Tuya :wink:

  2. i made a template in my sensor.yaml: divide the value by 10 and set the device class


  • platform: template
    sensors:
    buero_tobi_power:
    value_template: “{{ states(‘sensor.burotobias_power’)|float / 10}}”
    device_class: power
    unit_of_measurement: W

now the sensor will delivery the correct data

  1. now calculating the kWh
    we need a new sensor :wink: based on the last one we configured as a template
    got to helpers and select rieman sum integral sensor (prefix k)

  2. we have to change the device class that the energy integration accepts this sensor
    i have done this in my customize.yaml and looks like this

sensor.labor_buero_energy_total:
device_class: energy

Now you can add this new sensor to the home assistant energy configuration as an consumption device.

Hope this is helping others with the similar problem.
If other ways around to deal with the problem happy to learn.

1 Like