forked from geekofweek/homeassistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scripts.yaml
70 lines (66 loc) · 2.35 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
#################################################################
## Scripts
#################################################################
##########################################################
## Harmony Remote
##########################################################
input_select_harmony:
alias: "Start Remote activity from input select"
sequence:
service: remote.turn_on
data_template:
entity_id: remote.media_center
activity: >
{% if is_state("input_select.remote", "PowerOff") %}
-1
{% elif is_state("input_select.remote", "Watch TV") %}
22106204
{% elif is_state("input_select.remote", "Watch Netflix") %}
22107142
{% elif is_state("input_select.remote", "Watch Amazon") %}
22107067
{% elif is_state("input_select.remote", "Watch Over the Air TV") %}
22109519
{% elif is_state("input_select.remote", "Play Xbox One") %}
22107236
{% elif is_state("input_select.remote", "Play Nintendo Switch") %}
23666878
{% elif is_state("input_select.remote", "Play Wii U") %}
22107302
{% elif is_state("input_select.remote", "Play Sonos") %}
22815026
{% elif is_state("input_select.remote", "Turn on Receiver") %}
22107111
{% endif %}
##########################################################
## Sonos Text to Speech
##########################################################
say:
alias: Sonos TTS
sequence:
- service: media_player.sonos_snapshot
data_template:
with_group: yes
- delay: '00:00:03'
- service: media_player.sonos_unjoin
data_template:
entity_id: "{{ where }}"
- delay: '00:00:01'
- service: media_player.sonos_join
data_template:
master: "{{ master }}"
entity_id: "{{ where }}"
- delay: '00:00:01'
- service: media_player.volume_set
data_template:
entity_id: "{{ where }}"
volume_level: "{{ volume }}"
- delay: '00:00:02'
- service: tts.google_say
data_template:
entity_id: "{{ master }}"
message: "{{ what }}"
- delay: '00:00:25'
- service: media_player.sonos_restore
data_template:
with_group: yes