-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
scripts.yaml
224 lines (224 loc) · 7.07 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
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
212
213
214
215
216
217
218
219
220
221
222
223
224
do_not_disturb_mode:
alias: Do Not Disturb Mode
description: A flow for switching home into DND mode and back to normal
sequence:
- if:
- condition: state
entity_id: input_boolean.do_not_disturb
state: 'on'
then:
- alias: Make Speakers to low volume
service: media_player.volume_set
data:
volume_level: 0.2
target:
entity_id:
- media_player.living_room_homepod
- media_player.bedroom_homepod
- media_player.all_speakers
- if:
- condition: state
entity_id: fan.air_purifier
state: 'on'
then:
- device_id: 184d3eb0ce6565e4dbecc4403f4b9adf
domain: select
entity_id: 406c298e910de0e503c7713710e9df20
type: select_option
option: dim
- service: fan.set_preset_mode
metadata: {}
data:
preset_mode: Silent
target:
entity_id: fan.air_purifier
alias: Adjust Air Purifier when it's on
else:
- alias: Make Speakers to low volume
service: media_player.volume_set
data:
volume_level: 0.6
target:
entity_id:
- media_player.living_room_homepod
- media_player.bedroom_homepod
- media_player.all_speakers
- if:
- condition: state
entity_id: fan.air_purifier
state: 'on'
then:
- device_id: 184d3eb0ce6565e4dbecc4403f4b9adf
domain: select
entity_id: 406c298e910de0e503c7713710e9df20
type: select_option
option: bright
- service: fan.set_preset_mode
metadata: {}
data:
preset_mode: Auto
target:
entity_id:
- fan.air_purifier
alias: Adjust Air Purifier when it's on
mode: single
icon: mdi:bell-circle
away_mode:
alias: Away Mode
description: A flow for switching into Away mode
sequence:
- alias: Switch to Away Mode or restore from it
if:
- condition: state
entity_id: input_boolean.away
state: 'on'
then:
- alias: Notify about Away Mode activation
service: script.announcement
data:
speak: false
title: "Далеко від дому \U0001F3C3"
openings:
- Режим «Далеко від дому» увімкнено.
- Режим «Далеко від дому» автивовано.
- Активовано режим «Далеко від дому».
messages:
- Вмикається симуляція присутності.
- Готуємо дім до вашої відсутності.
- Щасливої дороги!
notify_data:
group: system
tag: away-mode
- alias: Arm Alarm
service: alarm_control_panel.alarm_arm_away
entity_id: alarm_control_panel.home_alarm
- alias: Turn on Presence Simulation
service: presence_simulation.start
data: {}
- alias: Turn off Water Heater
service: switch.turn_off
entity_id: switch.water_heater
- alias: Set TRV to Away during Heating Season
if:
- condition: state
entity_id: binary_sensor.heating_season
state: 'on'
then:
- alias: Set TRVs to away
service: climate.set_preset_mode
data:
entity_id:
- climate.living_room_heater
- climate.bedroom_heater
preset_mode: away
else:
- alias: Notify about Away Mode deactivation
service: script.announcement
data:
speak: false
title: "Далеко від дому \U0001F3C3"
openings:
- Режим «Далеко від дому» вимкнено.
- Режим «Далеко від дому» деактивовано.
- Деактивовано режим «Далеко від дому».
messages:
- Вимикаємо симуляцію присутності.
- Готуємо дім до вашого прибуття.
- Вітаю з поверненням!
notify_data:
group: system
tag: away-mode
- alias: Disarm Alarm
service: alarm_control_panel.alarm_disarm
entity_id: alarm_control_panel.home_alarm
- alias: Suggest cleaning home before arrival
service: script.announcement
data:
speak: false
title: "Пилосос \U0001F9F9"
openings:
- Cхоже вас давно не було вдома.
- Ви були далеко від дому.
- Ви на підході додому!
messages:
- Прибрати вдома?
- Прибирати перед приїздом?
- Бажаєте прибрати перед прибуттям?
- Почати прибирання?
- Робот пропонує домашнє прибирання.
- Пилосос хоче прибирати квартиру.
- Робот давно не прибирав. Почати?
notify_data:
url: /lovelace/vacuum
group: vacuum
tag: vacuum-cleaning
actions:
- action: VACUUM_START
title: Почати прибирання
activationMode: background
authenticationRequired: true
- alias: Turn off Presence Simulation
service: presence_simulation.stop
data: {}
- alias: Turn on Water Heater
service: switch.turn_on
entity_id: switch.water_heater
- alias: Heat up Home during Heating Season
if:
- condition: state
entity_id: binary_sensor.heating_season
state: 'on'
- condition: numeric_state
entity_id: sensor.home_temperature
below: 21
then:
- alias: Set TRVs to boost
service: climate.set_preset_mode
data:
entity_id:
- climate.living_room_heater
- climate.bedroom_heater
preset_mode: boost
else:
- service: climate.set_preset_mode
data:
preset_mode: manual
target:
entity_id:
- climate.bedroom_heater
- climate.living_room_heater
alias: Set TRV to manual
- alias: Cool down Home during Summer
if:
- condition: state
entity_id: binary_sensor.heating_season
state: 'off'
- condition: numeric_state
entity_id: sensor.home_temperature
above: 26
then:
- alias: Set ACs to cool down
service: climate.set_temperature
data:
entity_id:
- climate.living_room_ac
- climate.bedroom_ac
temperature: 18
hvac_mode: cool
- alias: Wait for home to cool down
wait_for_trigger:
platform: numeric_state
entity_id: sensor.home_temperature
below: 24
timeout:
hours: 1
- alias: Turn off ACs and set temperature to normal
service: climate.set_temperature
data:
entity_id:
- climate.living_room_ac
- climate.bedroom_ac
temperature: 23
hvac_mode: 'off'
mode: single
icon: mdi:shield-home-outline