I’m running HA in a virtualbox VM on MacOS host. The regular speedtest integration as well as speedtest-cli is too slow on my 300Mbit line from within the VM. Therefore I’ve set up a cron job to run speedtest-cli on the host and append the results to a text file that I can access from HA.
I’ve created a couple of file sensors to read the results like this:
- platform: file
name: Speedtest Download file
file_path: /config/shell_commands/speedtest.txt
value_template: >
{{ value.split(',')[1] | round(2) }}
unit_of_measurement: "Mbit/s"
However, there is now now way to configure the appearance of the result. For example, I can’t change the icon from the default “File” icon to a speed icon, neither can I set a unique-id. Is there a way around this?
Neither can I set json attributes, so I only need to access the file sensor once (like for the commandline-sensor).