Hi,
I tried different tutorials I found on the web but rounding just won’t work.
I successfully recalculated the sensor value (divide by 1000000), but the “round” at the end seems to be ignored.
My template sensors:
- platform: template
sensors:
sensor_download_mbit:
friendly_name: "InternetDownload"
unit_of_measurement: 'MBit'
value_template: "{{ (states('sensor.speedport_download') | int / 1000000 | round(0)) }}"
- platform: template
sensors:
sensor_upload_mbit:
friendly_name: "InternetUpload"
unit_of_measurement: 'MBit'
value_template: "{{ (states('sensor.speedport_upload') | int / 1000000 | round(0)) }}"
I also tried with float instead of int, it doesn’t make a difference.
How it looks:
Can you help me? Thanks!