Hi,
I have the following sensor:
- platform: command_line
name: Router_FW_Current
command: "ssh -i /config/ssh/id_rsa -o StrictHostKeyChecking=no [email protected] 'cat /etc/motd'"
The sensor works fine and I can see the output of the command in the Overview screen.
However, when I add a template to extract the FW version, like in the following excerpt:
- platform: command_line
name: Router_FW_Current
command: "ssh -i /config/ssh/id_rsa -o StrictHostKeyChecking=no [email protected] 'cat /etc/motd'"
value_template: "{{ states('sensor.Router_FW_Current')|regex_findall_index(find=' [0-9._]+')|trim }}"
it fails with the following message: https://pastebin.com/zst95bER
The template works, I tested it myself in the Developer Tools tab under Templates.
Any idea what could be wrong ?