Hi all,
I have an energy sensor giving power in Watts but I want to use kiloWatts so I need to divide the sensor by 1000.
I’ve done some searching on the forum and Google but don’t see the solution.
What I got so far:
- platform: template
sensors:
zonnepanelen_meter_vermogen_kw:
friendly_name: "Vermogen"
unit_of_measurement: 'kW'
value_template: "{{ (states('sensor.zonnepanelen_meter_vermogen_w') | int / 1000 | round(1)) }}"
With these code I do get the Watts down to kW but with 3 decimals. It looks like the “round(1)” is not working (I want 1 decimal) but I can’t seem to figure out what the proper code is.
Hopefully someone can help me with this one
Thanks!
Darryl