47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
pc_sleep:
|
|
alias: PC Sleep
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.hulk_ping
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.pc_caffeine
|
|
state: 'off'
|
|
sequence:
|
|
- service: shell_command.pc_suspend
|
|
- service: input_boolean.turn_on
|
|
target:
|
|
entity_id: input_boolean.pc_sleeping
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.hulk_ping
|
|
state: 'off'
|
|
sequence: [ ]
|
|
default:
|
|
mode: single
|
|
icon: mdi:desktop-tower-monitor
|
|
pc_safe_off:
|
|
alias: PC Safe Off
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.hulk_ping
|
|
state: 'on'
|
|
sequence:
|
|
- service: shell_command.pc_poweroff
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.hulk_ping
|
|
to: 'off'
|
|
- service: switch.turn_off
|
|
target:
|
|
entity_id: switch.computer_outlet
|
|
default: [ ]
|
|
- service: switch.turn_off
|
|
target:
|
|
entity_id: switch.computer_outlet
|
|
mode: single
|
|
icon: mdi:desktop-tower-monitor |