-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscripts.yaml
More file actions
211 lines (203 loc) · 5.35 KB
/
scripts.yaml
File metadata and controls
211 lines (203 loc) · 5.35 KB
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# Morning routine
morning_routine:
alias: Morning routine
sequence:
- delay:
hours: 0
minutes: 12
seconds: 0
milliseconds: 0
- service: media_player.volume_set
data:
volume_level: 0.01
target:
entity_id: media_player.sonos_beam
- service: media_player.select_source
data:
source: Rocker Rádió
target:
entity_id: media_player.sonos_beam
# - service: media_player.play
# target:
# entity_id: media_player.sonos_beam
- repeat:
count: '5'
sequence:
- delay:
hours: 0
minutes: 0
seconds: 45
milliseconds: 0
- service: media_player.volume_up
data: {}
target:
entity_id: media_player.sonos_beam
- delay:
hours: 0
minutes: 3
seconds: 0
milliseconds: 0
- choose:
- conditions:
- condition: state
entity_id: sun.sun
state: above_horizon
sequence:
- service: scene.turn_on
data: {}
target:
entity_id: scene.covers_kitchen_day
default:
- service: light.turn_on
data:
transition: 120
brightness_pct: 50
color_temp: 420
target:
entity_id: light.konyha
- service: light.turn_on
target:
entity_id: light.tablet_screens
- delay:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
- service: switch.turn_on
target:
entity_id: switch.coffee
- choose:
- conditions:
- condition: state
entity_id: sun.sun
state: above_horizon
sequence:
- service: scene.turn_on
data: {}
target:
entity_id: scene.covers_livingroom_day
default:
- service: light.turn_on
data:
transition: 120
brightness_pct: 50
color_temp: 420
target:
entity_id: light.eloterek
- delay:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
- service: media_player.volume_set
data:
volume_level: 0.10
target:
entity_id: media_player.living_room
- service: sonos.join
data:
master: media_player.sonos_beam
entity_id: media_player.living_room
- service: light.turn_on
data:
brightness_pct: 100
target:
entity_id: light.furdo
mode: single
icon: mdi:bed-outline
# Dynamic cleaning scripts
# vacuum_zones_cleanup:
# alias: "Clean up selected zones"
# sequence:
# - service: vacuum.send_command
# data_template:
# entity_id: vacuum.xiaomi_vacuum_cleaner
# command: zoned_cleanup
# params:
# 'zone_ids':
# - "{%- if states('input_boolean.toclean_livingroom') == 'on' %}Livingroom{% endif %}"
# - "{%- if states('input_boolean.toclean_bedroom') == 'on' %}Bedroom{% endif %}"
# - "{%- if states('input_boolean.toclean_common') == 'on' %}Common{% endif %}"
# - "{%- if states('input_boolean.toclean_kitchen') == 'on' %}Kitchen{% endif %}"
# vacuum_zones_vacuum:
# alias: "Vacuum selected zones"
# sequence:
# - service: vacuum.set_fan_speed
# data:
# entity_id: vacuum.xiaomi_vacuum_cleaner
# fan_speed: 'max'
# - service: script.vacuum_zones_cleanup
# vacuum_zones_mop:
# alias: "Vacuum selected zones"
# sequence:
# - service: vacuum.set_fan_speed
# data:
# entity_id: vacuum.xiaomi_vacuum_cleaner
# fan_speed: 'mop'
# - service: script.vacuum_zones_cleanup
# vacuum_goto_dustbin:
# alias: "Go to the dustbin"
# sequence:
# - service: vacuum.send_command
# data:
# entity_id: vacuum.xiaomi_vacuum_cleaner
# command: go_to
# params:
# 'spot_id': 'Dustbin'
# Automation helper scripts
minimal_light_if_sun_below_horizon:
sequence:
- condition: state
entity_id: sun.sun
state: below_horizon
- service: light.turn_on
target:
entity_id: light.eloterek
data:
brightness_pct: 5
- condition: state
state: home
entity_id: person.izer_nandor_jr
- service: light.turn_on
entity_id: light.szoba
data:
brightness_pct: 5
cover_open_if_sun_above_horizon:
sequence:
- condition: state
entity_id: sun.sun
state: above_horizon
- service: scene.turn_on
entity_id: scene.covers_day
hallway_light_on_for_time:
sequence:
- condition: state
entity_id: light.szelfogo
state: 'off'
- service: light.turn_on
entity_id: light.szelfogo
data:
brightness_pct: 10
- delay:
seconds: 15
- condition: state
entity_id: light.etkezo
state: 'off'
- service: light.turn_on
entity_id: light.szelfogo
data:
brightness: 0
transition: 3
# Nissan LEAF helper scripts
leaf_charge:
alias: Start charging
sequence:
- service: nissan_leaf.start_charge
data:
vin: !secret nissan_leaf_vin
leaf_update:
alias: Update status
sequence:
- service: nissan_leaf.update
data:
vin: !secret nissan_leaf_vin