-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscripts.yaml
135 lines (121 loc) · 3.27 KB
/
scripts.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
toggle_tv_power:
alias: TV on/off
sequence:
- service_template: >
{% if is_state('media_player.tv', 'off') %}
script.turn_tv_on
{% else %}
script.turn_tv_off
{% endif %}
turn_tv_on:
alias: Turn TV on
sequence:
- service: media_player.turn_on
data:
entity_id: media_player.chromecast_ultra
- delay:
seconds: 2
- service: media_player.turn_off
data:
entity_id: media_player.chromecast_ultra
turn_tv_off:
alias: Turn TV off
sequence:
- service: media_player.turn_off
data:
entity_id: media_player.tv
turn_everything_off:
alias: Turn everything off
sequence:
- service: media_player.turn_off
entity_id: media_player.tv
- service: light.turn_off
entity_id: all
- service: switch.turn_off
entity_id: all
cast_youtube:
alias: Cast YouTube
sequence:
- service: media_extractor.play_media
entity_id: media_player.chromecast_ultra
data:
media_content_id: "https://www.youtube.com/watch?v=ROkXM3csNWY"
media_content_type: video/youtube
cast_magic_mirror_camera:
alias: Cast Phone
sequence:
- service: media_extractor.play_media
data_template:
entity_id: "{{ media_player }}"
data:
media_content_id: !secret magic_mirror_video
media_content_type: image/jpg
turn_magic_mirror_screen_on:
alias: Turn on Magic Mirror screen
sequence:
- service: rest_command.fully_kiosk_browser_turn_screen_on
data:
device_ip: !secret magic_mirror_ip
device_port: !secret magic_mirror_fully_port
password: !secret magic_mirror_fully_password
turn_magic_mirror_screen_off:
alias: Turn off Magic Mirror screen
sequence:
- service: rest_command.fully_kiosk_browser_turn_screen_off
data:
device_ip: !secret magic_mirror_ip
device_port: !secret magic_mirror_fully_port
password: !secret magic_mirror_fully_password
turn_computer_on:
alias: Turn on computer
sequence:
- service: wake_on_lan.send_magic_packet
data:
mac: !secret computer_mac
turn_computer_off:
alias: Turn off computer
sequence:
- service: shell_command.turn_off_computer
data:
ssh_user: !secret shutdown_ssh_user
user: !secret shutdown_computer_user
ip: !secret computer_ip
timeout: 10
vacuum_room:
alias: Vacuum room
description: Start Roborock S6 room cleaning for a specific room
fields:
room_name:
description: Name of room to clean
example: kitchen
sequence:
- service: vacuum.send_command
data:
entity_id: vacuum.robocop
command: app_segment_clean
data_template:
params: >-
{% if 'kitchen' in room_name %}
[19]
{% elif 'living room' in room_name %}
[20]
{% else %}
[21]
{% endif %}
flic_button_lights_click:
alias: Flic button Lights click
sequence:
- service: scene.turn_on
data:
entity_id: scene.evening
flic_button_lights_double_click:
alias: Flic button Lights double click
sequence:
- service: light.turn_on
data:
entity_id: all
brightness: 255
flic_button_lights_hold:
alias: Flic button Lights hold
sequence:
- service: script.turn_everything_off