Hi everyone,
I am trying to use the command line sensor with an external python script to log road surface temperatures on my daily bike route. I added the following sensor to my config file
sensor 3:
platform: command_sensor
name: Bike road temperature
command: "python3 /home/pi/roadConditions.py road"
unit_of_measurement: "\u2103"
value_template: '{{ round(2) }}'
The script returns a single number like so,
8.67
but home assistant logs the temperature as 9.0. I would like the full number or at least 8.7.
I tried a couple of different options with the templates.
No template.
value_template: '{{ value | round(2) }}'
value_template: '{{ value }}'
but nothing works. Anyone got any ideas?