sensor.ssh icon indicating copy to clipboard operation
sensor.ssh copied to clipboard

Command and Output are Pulled by Sensor

Open juan11perez opened this issue 6 years ago • 4 comments

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.

juan11perez avatar Nov 15 '18 09:11 juan11perez

@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 avatar Nov 30 '18 04:11 juan11perez

@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 avatar Jan 27 '19 20:01 elRadix

@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.

juan11perez avatar Jan 30 '19 14:01 juan11perez

Would love this as a switch too.

ACrazyConcept avatar Aug 06 '19 07:08 ACrazyConcept