So I have speedtest giving me a download speed, but I wanted it to round to 0 decimal points so it displays without wrapping in the example below but the template version is not displaying a unit of measurement.
The guage is the speedtest download speed.
The sensor card is the rounded version.
I have put “unit of measurement” everywhere I can think but still just displays 30.
Code for template:
- platform: template
sensors:
speedtest_download_rounded:
value_template: "{{ states('sensor.speedtest_download') | float | round(0) }}"
unit_of_measurement: 'Mbit/s'
Code for sensor card:
- type: horizontal-stack
cards:
- type: sensor
name: Download
unit_of_measurement: 'Mbit/s'
entity: sensor.speedtest_download_rounded
severity:
red: 10
yellow: 18
green: 25
Display of card:
Display of guage showing Mbits/S
All I want is to be able to see 30 Mbit/s in the sensor card