alturismo
(alturismo)
1
Hi, may someone could give me a hint
i added a input text helper to set a 6 digit key
now my question
1/ how could i use this value as a variable for a command line prompt
i assume i somehow would have to trigger something …
thanks ahead for any hints
1 Like
Do you want to run the command then the helper changes, or must the helper’s value be passed to the command?
For the former, make an automation that triggers on the helper’s state.
For the latter, pass the state as a template by adding {{ states('input_text.gpr_key') }}
to your command.
2 Likes
alturismo
(alturismo)
3
for the start, value be passed … i ll try this for now
command_on: "sshpass -p mypasshere ssh -o StrictHostKeyChecking=no root@alsserverii /mnt/user/appdata/openconnect/testsed.sh {{ states('input_text.gpr_key') }}"
then the automation should be setup, but i would need the passed state in the cmdline anyhow, correct ?
alturismo
(alturismo)
4
thank you very much, works all like expected
1 Like