How to write data from a file to a input_text

Hello,

I need to generate a password from ssh and to stock it on home-assistant.

My ssh command :

ssh -i /config/.ssh/id_rsa -o 'StrictHostKeyChecking=no' [email protected] -p 66 "cat /volume1/homes/Guillaume/mdp > {{ states('input_text.mdp') }}"

It don’t works.

It’s possible ? How can I do that ?

Not using it but have a look in other posts, e.g. here
Configuring Script to send SSH command to Remote Machine - Configuration - Home Assistant Community (home-assistant.io)

This is the best way to create and update sensors remotely.

Thanks for your reply.

It work with a sensor and a command.

1 Like