-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathscripts.yaml
88 lines (83 loc) · 2.25 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
##################################################
## Scripts
##################################################
# Occupancy
morgan_away:
alias: Morgan away
sequence:
- service: homeassistant.turn_off
entity_id:
- light.morgans_lights
fraser_away:
alias: Fraser away
sequence:
- service: homeassistant.turn_off
entity_id:
- light.frasers_lights
everyone_away:
alias: everyone_away
sequence:
- service: homeassistant.turn_off
entity_id:
- script.morgan_away
- script.fraser_away
- group.conservatory_lights
- group.dining_room_lights
- group.living_room_lights
- switch.sonoff_garage_light
# Sonos
sonos_say:
# Source: https://home-assistant.io/cookbook/sonos_say/
alias: Sonos TTS script
sequence:
- service: sonos.snapshot
data:
entity_id: "{{ sonos_entity }}"
- service: media_player.unjoin
data:
entity_id: "{{ sonos_entity }}"
- service: media_player.volume_set
data:
entity_id: "{{ sonos_entity }}"
volume_level: "{{ volume }}"
# - service: tts.voicerss_say
- service: tts.google_translate_say
data:
entity_id: "{{ sonos_entity }}"
message: "{{ message }}"
- delay: "{{ delay }}"
- service: sonos.restore
data:
entity_id: "{{ sonos_entity }}"
burglar_alarm:
alias: Burglar Alarm Siren
sequence:
- service: sonos.snapshot
target:
entity_id: all
- service: media_player.unjoin
target:
entity_id: all
- service: media_player.volume_mute
data:
entity_id: all
is_volume_muted: false
- service: media_player.volume_set
data:
entity_id: all
volume_level: 1 # Max volume
- service: media_player.play_media
data:
entity_id: all
media_content_id: !secret siren_wav_url
media_content_type: "music"
- service: siren.turn_on # Turns on Ring Floo sirens (stops automatically after 30 seconds)
target:
entity_id:
- siren.conservatory_siren
- siren.driveway_siren
- siren.kitchen_siren
- delay: '00:00:30' # Sound siren for 30 seconds
- service: sonos.restore
target:
entity_id: all