-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththermostatautomations.yaml
More file actions
204 lines (188 loc) · 5.46 KB
/
Copy paththermostatautomations.yaml
File metadata and controls
204 lines (188 loc) · 5.46 KB
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
#Thermostat Automations
#Set thermostats to home when @ Home
- id: "e3f68cc9-8dbe-415f-abc9-b928eb6c7d5f"
alias: "Set Thermostats to Home"
initial_state: true
trigger:
- platform: state
entity_id:
- person.greg
- person.sara
condition:
and:
- condition: time
after: '08:00:00'
before: '17:00:00'
weekday:
- mon
- tue
- wed
- thu
- fri
- or:
- condition: state
entity_id: person.greg
state: 'home'
- condition: state
entity_id: person.sara
state: 'home'
- condition: state
entity_id: input_boolean.vacation_mode
state: 'off'
action:
- service: climate.set_preset_mode
data:
entity_id:
- climate.upstairs
- climate.downstairs
preset_mode: 'home'
#Set thermostats to Away when !@ Home
- id: "5f552aad-2362-46d5-affd-0e2828b10809"
alias: "Set Thermostats to Away"
initial_state: true
trigger:
- platform: state
entity_id:
- person.greg
- person.sara
condition:
- condition: time
after: '08:00:00'
before: '17:00:00'
weekday:
- mon
- tue
- wed
- thu
- fri
- condition: template
value_template: "{{ not is_state('person.greg','home') }}"
- condition: state
entity_id: person.sara
state: 'not_home'
- condition: state
entity_id: input_boolean.vacation_mode
state: 'off'
action:
- service: climate.set_preset_mode
data:
entity_id:
- climate.downstairs
- climate.upstairs
preset_mode: 'away'
- id: "be814806-f329-49ac-92a2-0101febb8d68"
alias: Thermostat Vacation Hold
initial_state: true
trigger:
platform: state
entity_id: input_boolean.vacation_mode
from: 'off'
to: 'on'
action:
- service: ecobee.create_vacation
data:
entity_id: climate.upstairs
vacation_name: "UpstairsHold"
cool_temp: 76
heat_temp: 65
fan_mode: auto
fan_min_on_time: 5
- service: ecobee.create_vacation
data:
entity_id: climate.downstairs
vacation_name: "DownstairsHold"
cool_temp: 76
heat_temp: 65
fan_mode: auto
fan_min_on_time: 5
- id: "b684a98f-5907-46ad-92aa-9468af0175b8"
alias: Thermostat Vacation End
initial_state: true
trigger:
platform: state
entity_id: input_boolean.vacation_mode
from: 'on'
to: 'off'
action:
- service: ecobee.delete_vacation
data_template:
entity_id: climate.upstairs
vacation_name: "UpstairsHold"
- service: ecobee.delete_vacation
data_template:
entity_id: climate.downstairs
vacation_name: "DownstairsHold"
- id: "676cd457-6218-41a3-943e-ff658e2febce"
alias: Thermostat Override
initial_state: true
trigger:
- platform: template
value_template: >-
{% set upstairs_mode = state_attr('climate.upstairs', 'preset_mode') %}
{% set downstairs_mode = state_attr('climate.downstairs', 'preset_mode') %}
{% if upstairs_mode == 'temp' or downstairs_mode == 'temp' %}
true
{% else %}
false
{% endif %}
action:
- service: notify.telegram_notify_greg
data:
message: >-
{% set upstairs_mode = state_attr('climate.upstairs', 'preset_mode') %}
{% set upstairs_set_temp = state_attr('climate.upstairs', 'target_temp_high') %}
{% set downstairs_mode = state_attr('climate.downstairs', 'preset_mode') %}
{% set downstairs_set_temp = state_attr('climate.downstairs', 'target_temp_high') %}
The Upstairs Thermostat has been set to {{upstairs_mode}} ({{upstairs_set_temp}})
and the Downstairs thermostat is set to {{downstairs_mode}} ({{downstairs_set_temp}}).
Due to manual override, Automation: "Set to Home" is being disabled.
data:
inline_keyboard:
- '/confirm?'
- '/deny?'
- id: "ca0e15cc-bbd3-4854-b621-e85220f90007"
alias: 'Override Confirm'
initial_state: true
trigger:
platform: event
event_type: telegram_callback
event_data:
command: '/confirm?'
action:
- service: automation.turn_off
target:
entity_id: automation.set_thermostats_to_home
- service: telegram_bot.answer_callback_query
data_template:
callback_query_id: '{{ trigger.event.data.id }}'
message: Disabling "Set Thermostats to Home"
- id: "e7fd2150-23e3-486c-bebb-785c3248a528"
alias: 'Override Deny'
initial_state: true
trigger:
platform: event
event_type: telegram_callback
event_data:
command: '/deny?'
action:
- service: telegram_bot.answer_callback_query
data_template:
callback_query_id: '{{ trigger.event.data.id }}'
message: Ignoring manual temperature set.
- id: "9e8c4224-3a98-4754-8911-6e11d515cfc8"
alias: Reset Thermostat Controls
trigger:
platform: event
event_type: telegram_command
event_data:
command: '/reset_thermostats'
action:
- service: telegram_bot.send_message
data:
chat_id: '{{ trigger.event.data.chat_id }}'
message: "Resetting Thermostat States"
- service: automation.turn_on
target:
entity_id:
- automation.set_thermostats_to_home
- automation.set_thermostats_to_away