Generate scripts file from fragments
This commit is contained in:
parent
f5faaf0c99
commit
b4a4c3b12d
@ -23,3 +23,7 @@
|
||||
name: Couch lamp
|
||||
- entityId: light.desk_lightbar
|
||||
name: Desk Lightbar
|
||||
- name: Concat scripts
|
||||
ansible.builtin.assemble:
|
||||
src: scripts
|
||||
dest: scripts.yaml
|
||||
|
@ -1,6 +1,6 @@
|
||||
tv_nintendo_switch:
|
||||
alias: Nintendo Switch
|
||||
icon: 'mdi:nintendo-switch'
|
||||
icon: mdi:nintendo-switch
|
||||
sequence:
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.harmonyhub_play_a_game
|
||||
@ -11,7 +11,7 @@ tv_nintendo_switch:
|
||||
entity_id: media_player.living_room
|
||||
tv_ps4:
|
||||
alias: PlayStation 4
|
||||
icon: 'mdi:sony-playstation'
|
||||
icon: mdi:sony-playstation
|
||||
sequence:
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.harmonyhub_play_ps4
|
||||
@ -22,7 +22,7 @@ tv_ps4:
|
||||
entity_id: media_player.living_room
|
||||
tv_twitch:
|
||||
alias: Twitch
|
||||
icon: 'mdi:twitch'
|
||||
icon: mdi:twitch
|
||||
sequence:
|
||||
- choose:
|
||||
- conditions:
|
||||
@ -45,7 +45,7 @@ tv_twitch:
|
||||
entity_id: media_player.nvidia_shield
|
||||
tv_youtube:
|
||||
alias: YouTube
|
||||
icon: 'mdi:youtube'
|
||||
icon: mdi:youtube
|
||||
sequence:
|
||||
- choose:
|
||||
- conditions:
|
||||
@ -68,7 +68,7 @@ tv_youtube:
|
||||
entity_id: media_player.nvidia_shield
|
||||
tv_netflix:
|
||||
alias: Netflix
|
||||
icon: 'mdi:netflix'
|
||||
icon: mdi:netflix
|
||||
sequence:
|
||||
- choose:
|
||||
- conditions:
|
||||
@ -91,7 +91,7 @@ tv_netflix:
|
||||
entity_id: media_player.nvidia_shield
|
||||
tv_firefox:
|
||||
alias: Firefox
|
||||
icon: 'mdi:firefox'
|
||||
icon: mdi:firefox
|
||||
sequence:
|
||||
- choose:
|
||||
- conditions:
|
||||
@ -114,7 +114,7 @@ tv_firefox:
|
||||
entity_id: media_player.nvidia_shield
|
||||
tv_off:
|
||||
alias: 'TV Off'
|
||||
icon: 'mdi:power'
|
||||
icon: mdi:power
|
||||
sequence:
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.harmonyhub_play_a_game
|
47
scripts/30.pc-sleep.yaml
Normal file
47
scripts/30.pc-sleep.yaml
Normal file
@ -0,0 +1,47 @@
|
||||
pc_sleep:
|
||||
alias: PC Sleep
|
||||
sequence:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.desktop
|
||||
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.desktop
|
||||
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.desktop
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: shell_command.pc_poweroff
|
||||
- wait_for_trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.desktop
|
||||
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
|
Loading…
Reference in New Issue
Block a user