#Turn off Linux PC
1 messages · Page 1 of 1 (latest)
How about running an ssh command with command_line integration?
yeah thats what i was looking at now was following this https://siytek.com/home-assistant-shell/
so basicly i would have to setup passworless ssh by using a key
and then something like this in my configuration.yaml would work?
shell_command:
bazzite_turn_off: ssh -i /config/ssh/id_rsa -o 'StrictHostKeyChecking=no' zany130@************ 'systemctl poweroff'
script:
turn_off_bazzite:
alias: turn off bazzite
sequence:
service: shell_command.bazzite_turn_off
something like that. the script is a bit redundant if it only has one service call (could just call that instead of the script)
ihow would I do that? ideally I would it would be a toogable swtich in the dash.
though maybe having it as a script is also usefull for calling it in a scene? (im a little confused when you would use scripts)
or theres system bridge which adds many other commands and possibilities https://system-bridge.timmo.dev/
and the system bridge integration: https://www.home-assistant.io/integrations/system_bridge/
You can't call scripts in a scene.
Maybe you want a WOL switch:
https://www.home-assistant.io/integrations/wake_on_lan/#switch
ahh i already have wol switch . I just need to turn it off
oh that looks perfect didn't see that one has more things besides that look very useful
hmm well need to figure out why system bridge doesnt want to work so in the mean time back to using ssh though if i can't automate it then not much point i guess...
so there no way for me to have a scene that runs my ssh command?
I want to have a "sleep" scene where when activated everything including my pc turns off