-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathautomations.yaml
189 lines (189 loc) · 5.48 KB
/
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
- id: Garage Amp Volume
alias: Garage Amp Volume
trigger:
platform: state
entity_id: input_number.garage_amp_volume
action:
- service: c4_services.handle_garage_amp_volume_select
- id: Garage Radio Tuner
alias: Garage Radio Tuner
trigger:
platform: state
entity_id: input_select.garage_radio_stations
action:
service: c4_services.handle_garage_tuner_channel_select
- id: Garage AMP Input
alias: Garage Amp Input
trigger:
platform: state
entity_id: input_select.garage_amp_input
action:
service: c4_services.handle_garage_amp_input_select
- id: Garage AMP On
alias: Garage AMP On
trigger:
platform: state
entity_id: input_select.garage_amp_on
action:
service: c4_services.handle_garage_amp_on_select
- id: Garage AMP Off
alias: Garage Amp Off
trigger:
platform: state
entity_id: input_select.garage_amp_off
action:
service: c4_services.handle_garage_amp_off_select
- id: Garage Amp Input Override
alias: Garage Amp Input Override
initial_state: true
trigger:
platform: state
entity_id: input_select.garage_c4_input
action:
service: input_select.select_option
entity_id: input_select.garage_amp_input
data_template:
option: >-
{% if is_state('input_select.garage_c4_input', 'Tuner') %}1
{% elif is_state('input_select.garage_c4_input', 'Tuner 2') %}2
{% elif is_state('input_select.garage_c4_input', 'Volumio') %}3
{% elif is_state('input_select.garage_c4_input', 'Bluetooth') %}4
{% else %}1 ### whatever you want to be default
{%- endif %}
- id: Garage Volume to 0
alias: Garage Volume to 0
trigger:
platform: state
entity_id: switch.garage_switch
to: 'off'
action:
- service: input_number.set_value
data_template:
entity_id: input_number.garage_amp_volume
value: .04
- id: Great Room Amp Volume
alias: Great Room Amp Volume
trigger:
platform: state
entity_id: input_number.gr_amp_volume
action:
- service: c4_services.handle_gr_amp_volume_select
- id: Great Room Radio Tuner
alias: Great Room Radio Tuner
trigger:
platform: state
entity_id: input_select.gr_radio_stations
action:
service: c4_services.handle_gr_tuner_channel_select
- id: Great Room AMP Input
alias: Great Room Amp Input
trigger:
platform: state
entity_id: input_select.gr_amp_input
action:
service: c4_services.handle_gr_amp_input_select
- id: Great Room AMP On
alias: Great Room AMP On
trigger:
platform: state
entity_id: input_select.gr_amp_on
action:
service: c4_services.handle_gr_amp_on_select
- id: Great Room AMP Off
alias: Great Room Amp Off
trigger:
platform: state
entity_id: input_select.gr_amp_off
action:
service: c4_services.handle_gr_amp_off_select
- id: Great Room Amp Input Override
alias: Great Room Amp Input Override
initial_state: true
trigger:
platform: state
entity_id: input_select.gr_c4_input
action:
service: input_select.select_option
entity_id: input_select.gr_amp_input
data_template:
option: >-
{% if is_state('input_select.gr_c4_input', 'Tuner 1') %}1
{% elif is_state('input_select.gr_c4_input', 'Tuner') %}2
{% elif is_state('input_select.gr_c4_input', 'Volumio') %}3
{% elif is_state('input_select.gr_c4_input', 'Bluetooth') %}4
{% else %}2 ### whatever you want to be default
{%- endif %}
- id: Great Room Volume to 0
alias: Great Room Volume to 0
trigger:
platform: state
entity_id: switch.gr_switch
to: 'off'
action:
- service: input_number.set_value
data_template:
entity_id: input_number.gr_amp_volume
value: .04
- id: Lanai Amp Volume
alias: Lanai Amp Volume
trigger:
platform: state
entity_id: input_number.lanai_amp_volume
action:
- service: c4_services.handle_lanai_amp_volume_select
- id: Lanai Radio Tuner
alias: Lanai Radio Tuner
trigger:
platform: state
entity_id: input_select.lanai_radio_stations
action:
service: c4_services.handle_lanai_tuner_channel_select
- id: Lanai AMP Input
alias: Lanai Amp Input
trigger:
platform: state
entity_id: input_select.lanai_amp_input
action:
service: c4_services.handle_lanai_amp_input_select
- id: Lanai AMP On
alias: Lanai AMP On
trigger:
platform: state
entity_id: input_select.lanai_amp_on
action:
service: c4_services.handle_lanai_amp_on_select
- id: Lanai AMP Off
alias: Lanai Amp Off
trigger:
platform: state
entity_id: input_select.lanai_amp_off
action:
service: c4_services.handle_lanai_amp_off_select
- id: Lanai Amp Input Override
alias: Lanai Amp Input Override
initial_state: true
trigger:
platform: state
entity_id: input_select.lanai_c4_input
action:
service: input_select.select_option
entity_id: input_select.lanai_amp_input
data_template:
option: >-
{% if is_state('input_select.lanai_c4_input', 'Tuner 1') %}1
{% elif is_state('input_select.lanai_c4_input', 'Tuner') %}2
{% elif is_state('input_select.lanai_c4_input', 'Volumio') %}3
{% elif is_state('input_select.lanai_c4_input', 'Bluetooth') %}4
{% else %}2 ### whatever you want to be default
{%- endif %}
- id: Lanai Volume to 0
alias: Lanai Volume to 0
trigger:
platform: state
entity_id: switch.lanai_switch
to: 'off'
action:
- service: input_number.set_value
data_template:
entity_id: input_number.lanai_amp_volume
value: .04