sensor.ssh
sensor.ssh copied to clipboard
Command and Output are Pulled by Sensor
Ubuntu 18.04.1 LTS HASS - Docker
First of all, thank you very much. Sensor is great!
I have some feedback/request. I used the sensor to run this command:
cat /var/run/reboot-required
The sensor provided this output:
cat /var/run/reboot-required ***system restart required****
It brings back the output along with the initial command. I can easily fix it with the value_template option, but is it intended to do that?
Thank you.
@jchasey Could you consider making a switch/command version of this? It would do away with ssh keys when firing commands to the host from a container or other servers. Thank you
@juan11perez see example here how I use ssh as a switch https://community.home-assistant.io/t/asuswrt-control-your-router-with-custom-switches/82351
@elRadix thank you. I have a similar setup. In fact you dont need to create files in /usr/local/bin. if you're ssh"ing" into the host using the key, you can put the whole command in a shell_command within HASS.
the interesting thing about this sensor is that it doesnt need a key. only user/pasword. So you can use in other scenarios where generating a key may not be the easiest.
Would love this as a switch too.