I am struggling with a command_line sensor I am trying to add to my configuration.yaml so that I can send an SSH command that retrieves the nvme drive temperature(s) in my debian-based homelab. I've set up passwordless SSH from the HA box to the homelab machine, AND i've set up the actual command in a script that I can call from HA.
At this point, if I open up the Terminal Add-On and run this:
ssh josh@192.168.5.226 "/usr/local/bin/nvme_temp" -o StrictHostKeyChecking=no
Then I get the answer I want "105 104" (there's 2 drives I'm checking on simultaneously).
But when I put this into my configuration.yaml, I dont see my new sensors anywhere, nor do I see any errors in the logs that seem relevant:
- platform: command_line
name: superminitemp1
command: 'ssh josh@192.168.5.226 "/usr/local/bin/nvme_temp" -o StrictHostKeyChecking=no'
unit_of_measurement: "°F"
scan_interval: 60
value_template: "{{ value.split()[0] | int }}"
- platform: command_line
name: superminitemp2
command: 'ssh josh@192.168.5.226 "/usr/local/bin/nvme_temp" -o StrictHostKeyChecking=no'
unit_of_measurement: "°F"
scan_interval: 60
value_template: "{{ value.split()[1] | int }}"