Hello,
I am currently using a sensor to retrieve a password from a text file on a Linux server:
sensor:
platform: command_line
name: MDP
unique_id: sensor.mdp
command: "ssh -i /config/.ssh/id_rsa -o 'StrictHostKeyChecking=no' [email protected] -p 66 'cat /var/www/html/upload/mdp'"
The problem is that this sensor will connect to the server every minute to retrieve the value.
I think this sensor system is not suitable.
How can I retrieve this value on demand, for example when I press a button?
I have another SSH command to generate the password, but I have never been able to retrieve this value and store it on Home Assistant, which is why I use the sensor…
If anyone has a better idea.
Thank you