I’m new to HA so please go easy. I’ve had a look at Rounding number in a card? and Templating - Home Assistant but am still scratching my head.
I’m using the Speedtest integration/sensor on my dashboard to display up/down speed as a gauge. I want to round the number to an integer.
Example, I want to round the numbers below to 912
and 812
:
I’ve tried something like this, but it does not round the number.
- type: horizontal-stack
cards:
- type: gauge
entity: sensor.speedtest_download
min: 100
max: 1000
severity:
green: 800
yellow: 500
red: 100
name: ' '
unit: ↓
- type: gauge
value_template: "{{ states('sensor.speedtest_upload') | round(0) }}"
entity: sensor.speedtest_upload
min: 100
max: 1000
severity:
green: 800
yellow: 500
red: 100
name: ' '
unit: ↑