From 5df617f9650f543c8893e5646b82dbaca3dc4b3c Mon Sep 17 00:00:00 2001 From: pgrondek Date: Mon, 19 Apr 2021 12:27:29 +0200 Subject: [PATCH] Change PC ssh commands --- automations/files/automations/goto-sleep.yaml | 2 +- automations/files/configuration.yaml | 3 ++- automations/files/scripts/modes.yaml | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/automations/files/automations/goto-sleep.yaml b/automations/files/automations/goto-sleep.yaml index a4b8789..85b79b1 100644 --- a/automations/files/automations/goto-sleep.yaml +++ b/automations/files/automations/goto-sleep.yaml @@ -29,5 +29,5 @@ - condition: state entity_id: binary_sensor.desktop state: 'on' - - service: shell_command.poweroff_pc + - service: shell_command.pc_poweroff mode: single diff --git a/automations/files/configuration.yaml b/automations/files/configuration.yaml index e78a0ed..c2e85a2 100644 --- a/automations/files/configuration.yaml +++ b/automations/files/configuration.yaml @@ -78,7 +78,8 @@ spotify: client_secret: !secret spotify_client_secret shell_command: - poweroff_pc: 'ssh -i /config/.ssh/id_rsa -o UserKnownHostsFile=/config/.ssh/known_hosts home-assistant@hulk.lan sudo /sbin/poweroff' + pc_poweroff: 'ssh -i /config/.ssh/id_rsa -o UserKnownHostsFile=/config/.ssh/known_hosts home-assistant@hulk.lan sudo /sbin/poweroff' + pc_suspend: 'ssh -i /config/.ssh/id_rsa -o UserKnownHostsFile=/config/.ssh/known_hosts home-assistant@hulk.lan sudo /usr/sbin/pm-suspend' rest_command: octoprint_connect: diff --git a/automations/files/scripts/modes.yaml b/automations/files/scripts/modes.yaml index 87d9cb3..e7a6959 100644 --- a/automations/files/scripts/modes.yaml +++ b/automations/files/scripts/modes.yaml @@ -28,10 +28,10 @@ good_night: - light.hallway_lightstrip - light.computer_computer_cave_background - service: switch.turn_off - data: { } entity_id: - switch.desk_motor_on_off - switch.computer_outlet + - service: shell_command.pc_suspend mode: single icon: 'mdi:weather-night' good_morning: @@ -80,8 +80,8 @@ leave_home: - light.hallway_lightstrip - light.computer_computer_cave_background - service: switch.turn_off - data: { } entity_id: switch.desk_motor_on_off + - service: shell_command.pc_suspend mode: single icon: 'mdi:home-export-outline' arrive_home: