Wrong unit_of_measurement from sensor


I have some switches with power meter. They appear as two sensors. The problem is that all the sensor is W but the in Telldus live they apper as kWh and W. Yesterday I got a new switch and in telldus live it appears with 4 sensors kWh, W, V, and A but in home-assistant there is only 3 and I’m missing the kWh value but the 3 I got appears as W

You’ll need to use a template sensor.
I managed to solve it like this:

My configuration.yaml looks like this:

- platform: template
        value_template: "{{ states('sensor.studio_power_3') }}"
        unit_of_measurement: W
        friendly_name: 'Studio Power'
        value_template: "{{ states('sensor.studio_power') }}"
        unit_of_measurement: V
        friendly_name: 'Studio Voltage'
        value_template: "{{ states('sensor.studio_power_2') }}"
        unit_of_measurement: A
        friendly_name: 'Studio Current'

My mini switch plug is named studio in Telldus Live, so change that and you’ll be fine.

And to clean up the history tab, you can exclude the Telldus Live sensor data by adding the following to the configuration.yaml:

      - sensor.name_of_the_sensor