-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathexample_automations.yaml
169 lines (169 loc) · 4.3 KB
/
example_automations.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
#
# Example automations. You cannot use this file as is, you need to code them into your Configuration->Automations UI.
#
- alias: MLGW Yellow on A.MEM
description: Start playing Radio ID 0 on the netradio component.
trigger:
- platform: event
event_data:
payload_type: BEO4_KEY
payload:
source: A.MEM
command: Yellow
event_type: mlgw.ML_telegram
condition: []
action:
- service: netradio.start_radio
data:
radio_index: 0
entity_id: media_player.bang_olufsen
mode: single
- alias: Green on MLGW A.MEM
description: 'Switch on Spotify when I press the green button on the Beo4 remote.
Requires the ''spotcast'' script from: https://github.com/fondberg/spotcast'
trigger:
- platform: event
event_type: mlgw.ML_telegram
event_data:
payload_type: BEO4_KEY
payload:
source: A.MEM
command: Green
condition: []
action:
- service: script.start_playing_spotify
data: {}
mode: single
- alias: MLGW Stop Streaming
description: Stop playing on the Chromecast device called 'bang_olufsen'
trigger:
- platform: event
event_type: mlgw.ML_telegram
event_data:
payload_type: BEO4_KEY
payload:
source: A.MEM
command: Stop
condition: []
action:
- service: media_player.media_pause
data: {}
entity_id: media_player.bang_olufsen
mode: single
- alias: MLGW ALL STANDBY
description: turn off chromecast on Bang and olufsen when All Standby command happens
trigger:
- platform: event
event_type: mlgw.MLGW_telegram
event_data:
payload_type: all_standby
condition: []
action:
- service: media_player.media_stop
data: {}
entity_id: media_player.bang_olufsen
mode: single
- alias: MLGW Step Up on A.MEM
description: next radio when playing
trigger:
- platform: event
event_type: mlgw.ML_telegram
event_data:
payload_type: BEO4_KEY
payload:
source: A.MEM
command: STEP_UP
condition:
- condition: state
entity_id: media_player.bang_olufsen
state: Default Media Receiver
attribute: app_name
action:
- service: netradio.next_radio
data:
entity_id: media_player.bang_olufsen
mode: single
- alias: MLGW Step Down on A.MEM
description: Switch to previous radio playing on the netradio component.
trigger:
- platform: event
event_type: mlgw.ML_telegram
event_data:
payload_type: BEO4_KEY
payload:
source: A.MEM
command: STEP_DOWN
condition:
- condition: state
entity_id: media_player.bang_olufsen
state: Default Media Receiver
attribute: app_name
action:
- service: netradio.prev_radio
data:
entity_id: media_player.bang_olufsen
mode: single
- alias: MLGW Wind on A.MEM
description: Go to next track on Spotify.
trigger:
- platform: event
event_type: mlgw.ML_telegram
event_data:
payload_type: BEO4_KEY
payload:
source: A.MEM
command: WIND
condition:
- condition: state
entity_id: media_player.bang_olufsen
state: Spotify
attribute: app_name
action:
- service: media_player.media_next_track
data: {}
entity_id: media_player.bang_olufsen
mode: single
- alias: MLGW Digit-0 on A.MEM
description: Switch to Radio ID 0 (the first radio) on the netradio component.
trigger:
- platform: event
event_type: mlgw.ML_telegram
event_data:
payload_type: BEO4_KEY
payload:
source: A.MEM
command: Digit-0
condition:
- condition: state
entity_id: media_player.bang_olufsen
state: Default Media Receiver
attribute: app_name
action:
- service: netradio.start_radio
data:
entity_id: media_player.bang_olufsen
radio_index: 0
mode: single
- alias: Blue on MLGW Radio in bathroom
description: Switch on the bedroom speaker and off the bathroom speaker for when
I exit the bathroom and go to the bedroom
trigger:
- platform: event
event_type: mlgw.ML_telegram
event_data:
payload_type: BEO4_KEY
from_mln: 7
payload:
source: RADIO
command: Blue
condition: []
action:
- service: media_player.select_source
data:
source: RADIO
entity_id: media_player.bedroom
- delay: '1'
- service: media_player.turn_off
data: {}
entity_id: media_player.bathroom
mode: single