This repository has been archived by the owner on Mar 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
scripts.yaml
executable file
·210 lines (194 loc) · 8.5 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
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
---
# yamllint disable rule:line-length
ring_the_doorbell:
sequence:
- service: mqtt.publish
data:
topic: "omg/rfgw_hallway/commands/PLSL_450/433_1/RFBITS_24"
payload: "14878223"
correct_objects_values:
sequence:
- service: mqtt.publish
data:
topic: "smarthome/mqtt_client/status_update"
payload: "Offline"
- service: input_text.set_value
data_template:
entity_id: input_text.shabbat_notify_minutes_start
value: "{%if states.input_text.shabbat_notify_minutes_start.state != 'unknown' %}{{ states.input_text.shabbat_notify_minutes_start.state }}{%else%}15{%endif%}"
- service: input_number.set_value
data_template:
entity_id: input_number.nursery_ambiance_color_temperature
value: "{% if states.light.nursery_main_light.attributes.color_temp %}{{ states.light.nursery_main_light.attributes.color_temp }}{%else%}153{%endif%}"
- service: input_number.set_value
data_template:
entity_id: input_number.nursery_lightstrip_brightness
value: "{% if states.light.nursery_dresser_light.attributes.brightness %}{{ states.light.nursery_dresser_light.attributes.brightness }}{%else%}0{%endif%}"
- service: input_number.set_value
data_template:
entity_id: input_number.nursery_bloom_brightness
value: "{% if states.light.nursery_chair_light.attributes.brightness %}{{ states.light.nursery_chair_light.attributes.brightness }}{%else%}0{%endif%}"
- service: script.turn_on
data:
entity_id: script.sync_nursery_ac_entities
- service: script.turn_on
data:
entity_id: script.sync_bedroom_ac_entities
- service: script.turn_on
data:
entity_id: script.sync_living_room_ac_entities
run_speed_test:
sequence:
- service: speedtestdotnet.speedtest
tv_led_theme_select_script:
sequence:
- service: scene.turn_on
data_template:
entity_id: >
{% if (selected_theme == "Blissful") %} scene.blissful_lights
{% elif (selected_theme == "Cheerful") %} scene.cheerful_lights
{% elif (selected_theme == "Dream") %} scene.dream_lights
{% elif (selected_theme == "Energizing") %} scene.energizing_lights
{% elif (selected_theme == "Epic") %} scene.epic_lights
{% elif (selected_theme == "Exciting") %} scene.exciting_lights
{% elif (selected_theme == "Focusing") %} scene.focusing_lights
{% elif (selected_theme == "Halloween") %} scene.halloween_lights
{% elif (selected_theme == "Hanukkah") %} scene.hanukkah_lights
{% elif (selected_theme == "Holy") %} scene.holy_lights
{% elif (selected_theme == "Independence Day") %} scene.independence_day_lights
{% elif (selected_theme == "Intense") %} scene.intense_lights
{% elif (selected_theme == "Mellow") %} scene.mellow_lights
{% elif (selected_theme == "Peaceful") %} scene.peaceful_lights
{% elif (selected_theme == "Powerful") %} scene.powerful_lights
{% elif (selected_theme == "Relaxing") %} scene.relaxing_lights
{% elif (selected_theme == "Santa") %} scene.santa_lights
{% elif (selected_theme == "Serene") %} scene.serene_lights
{% elif (selected_theme == "Soothing") %} scene.soothing_lights
{% elif (selected_theme == "Sports") %} scene.sports_lights
{% elif (selected_theme == "Tranquil") %} scene.tranquil_lights
{% elif (selected_theme == "Warming") %} scene.warming_lights
{% endif %}
set_nursery_ceiling_fan_low:
sequence:
- service: fan.set_speed
data:
entity_id: "fan.nursery_ceiling_fan"
speed: "low"
set_nursery_ceiling_fan_medium:
sequence:
- service: fan.set_speed
data:
entity_id: "fan.nursery_ceiling_fan"
speed: "medium"
set_nursery_ceiling_fan_high:
sequence:
- service: fan.set_speed
data:
entity_id: "fan.nursery_ceiling_fan"
speed: "high"
set_nursery_ceiling_fan_off:
sequence:
- service: fan.turn_off
data:
entity_id: "fan.nursery_ceiling_fan"
set_office_ceiling_fan_low:
sequence:
- service: fan.set_speed
data:
entity_id: "fan.office_ceiling_fan"
speed: "low"
set_office_ceiling_fan_medium:
sequence:
- service: fan.set_speed
data:
entity_id: "fan.office_ceiling_fan"
speed: "medium"
set_office_ceiling_fan_high:
sequence:
- service: fan.set_speed
data:
entity_id: "fan.office_ceiling_fan"
speed: "high"
set_office_ceiling_fan_off:
sequence:
- service: fan.turn_off
data:
entity_id: "fan.office_ceiling_fan"
check_last_recorder_session:
sequence:
- service: notify.telegram_tomer_service
data:
message: "Last ended session end status was {{ states.sensor.last_recorder_status.state }}"
title: "Recorder"
sync_nursery_ac_entities:
sequence:
- service: input_number.set_value
data_template:
entity_id: input_number.nursery_ac_temperature_select
value: "{%if states.input_number.nursery_ac_temperature_select.state != 'unknown' %}{{ states.input_number.nursery_ac_temperature_select.state }}{%else%}30{%endif%}"
- service: mqtt.publish
data_template:
topic: "tomerfi_custom_ac/nursery/current_temperature"
payload_template: "{{ states.sensor.nursery_broadlink_a1_temperature.state | round(1) }}"
- service: climate.set_fan_mode
data_template:
entity_id: climate.nursery_air_conditioner
fan_mode: "{{ states.input_select.nursery_ac_fan_level.state }}"
- service: climate.set_temperature
data_template:
entity_id: climate.nursery_air_conditioner
temperature: "{{ states.input_number.nursery_ac_temperature_select.state }}"
- condition: template
value_template: "{{ states.input_select.nursery_ac_operation_mode.state != 'off' }}"
- service: climate.set_operation_mode
data_template:
entity_id: climate.nursery_air_conditioner
operation_mode: "{{ states.input_select.nursery_ac_operation_mode.state }}"
sync_living_room_ac_entities:
sequence:
- service: input_number.set_value
data_template:
entity_id: input_number.living_room_ac_temperature_select
value: "{%if states.input_number.living_room_ac_temperature_select.state != 'unknown' %}{{ states.input_number.living_room_ac_temperature_select.state }}{%else%}30{%endif%}"
- service: mqtt.publish
data_template:
topic: "tomerfi_custom_ac/living_room/current_temperature"
payload_template: "{{ states.sensor.living_room_temperature.state | round(1) }}"
- service: climate.set_fan_mode
data_template:
entity_id: climate.living_room_air_conditioner
fan_mode: "{{ states.input_select.living_room_ac_fan_level.state }}"
- service: climate.set_temperature
data_template:
entity_id: climate.living_room_air_conditioner
temperature: "{{ states.input_number.living_room_ac_temperature_select.state }}"
- condition: template
value_template: "{{ states.input_select.living_room_ac_operation_mode.state != 'off' }}"
- service: climate.set_operation_mode
data_template:
entity_id: climate.living_room_air_conditioner
operation_mode: "{{ states.input_select.living_room_ac_operation_mode.state }}"
sync_bedroom_ac_entities:
sequence:
- service: input_number.set_value
data_template:
entity_id: input_number.bedroom_ac_temperature_select
value: "{%if states.input_number.bedroom_ac_temperature_select.state != 'unknown' %}{{ states.input_number.bedroom_ac_temperature_select.state }}{%else%}30{%endif%}"
- service: mqtt.publish
data_template:
topic: "tomerfi_custom_ac/bedroom/current_temperature"
payload_template: "{{ states.sensor.bedroom_temperature.state | round(1) }}"
- service: climate.set_fan_mode
data_template:
entity_id: climate.bedroom_air_conditioner
fan_mode: "{{ states.input_select.bedroom_ac_fan_level.state }}"
- service: climate.set_temperature
data_template:
entity_id: climate.bedroom_air_conditioner
temperature: "{{ states.input_number.bedroom_ac_temperature_select.state }}"
- condition: template
value_template: "{{ states.input_select.bedroom_ac_operation_mode.state != 'off' }}"
- service: climate.set_operation_mode
data_template:
entity_id: climate.bedroom_air_conditioner
operation_mode: "{{ states.input_select.bedroom_ac_operation_mode.state }}"