Launch command line when pushing button

Hello,

I would like to create a virtual buttun with the following action :

=> type a command line in my terminal & SSH addon

Any idea of how to do it?

Many thks!

make an Shell Command Shell Command - Home Assistant

then make an action that runs the shell command.

Many thks ! I have done. On question, how can I check that the command line is done properly?

for exemple, my cmd shell is a ping, but i do not see it in the terminal, how can I check ?

cli commands have an exit code. 0 is all OK. anything else is an error.

perhaps you want to run it as a sensor.

the output is in homeassistant.log