Repository navigation
Expand file tree
/
Copy pathscripts.yaml
More file actions
55 lines (55 loc) · 1.46 KB
/
Copy pathscripts.yaml
File metadata and controls
55 lines (55 loc) · 1.46 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
morgan_away:
alias: Morgan away
description: Turn off Morgan's bedroom lights when Morgan leaves home.
mode: single
sequence:
- action: light.turn_off
target:
entity_id: light.morgan_s_lights
fraser_away:
alias: Fraser away
description: Turn off Fraser's bedroom lights when Fraser leaves home.
mode: single
sequence:
- action: light.turn_off
target:
entity_id: light.fraser_s_lights
everyone_away:
alias: Everyone away
description: Turn off occupied-area lights when everyone leaves home.
mode: single
sequence:
- action: homeassistant.turn_off
target:
entity_id:
- light.morgan_s_lights
- light.fraser_s_lights
- group.conservatory_lights
- group.dining_room_lights
- group.living_room_lights
sonos_say:
alias: Sonos TTS script
description: Announce a supplied message on a Sonos entity and restore playback afterwards.
mode: queued
max: 10
sequence:
- action: sonos.snapshot
data:
entity_id: '{{ sonos_entity }}'
- action: media_player.unjoin
data:
entity_id: '{{ sonos_entity }}'
- action: media_player.volume_set
data:
entity_id: '{{ sonos_entity }}'
volume_level: '{{ volume }}'
- action: tts.speak
target:
entity_id: tts.google_translate_en_co_uk
data:
media_player_entity_id: '{{ sonos_entity }}'
message: '{{ message }}'
- delay: '{{ delay }}'
- action: sonos.restore
data:
entity_id: '{{ sonos_entity }}'