-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsmartthermostat.yaml
More file actions
199 lines (199 loc) · 5.58 KB
/
smartthermostat.yaml
File metadata and controls
199 lines (199 loc) · 5.58 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
blueprint:
name: Smart Thermostat
description: >-
Based on your window sensor this automation turns the thermostat on or off.
You can also specify the time that is needed to switch the state.
In order to avoid heating in summer, you can specify the weather entity and your winter temperature.
Read more: https://community.home-assistant.io/t/smart-thermostat/258368
domain: automation
input:
window_sensor_1:
name: Window / Door Sensor 1
selector:
entity:
domain: binary_sensor
window_1_delay:
name: Window / Door Sensor 1 Delay
description: "Time the sensor needs to stay the same after change to trigger the automation. This is done to avoid retriggering. (Default = 5s)"
default: 5
selector:
number:
mode: box
min: 0
max: 3600
unit_of_measurement: seconds
window_sensor_2:
name: Window / Door Sensor 2
selector:
entity:
domain: binary_sensor
window_2_delay:
name: Window / Door Sensor 2 Delay
default: 5
selector:
number:
mode: box
min: 0
max: 3600
unit_of_measurement: seconds
window_sensor_3:
name: Window / Door Sensor 3
selector:
entity:
domain: binary_sensor
window_3_delay:
name: Window / Door Sensor 3 Delay
default: 5
selector:
number:
mode: box
min: 0
max: 3600
unit_of_measurement: seconds
window_sensor_4:
name: Window / Door Sensor 4
selector:
entity:
domain: binary_sensor
window_4_delay:
name: Window / Door Sensor 4 Delay
default: 5
selector:
number:
mode: box
min: 0
max: 3600
unit_of_measurement: seconds
weather:
name: Weather
description: "Specify your weather to get the current outside temperature from."
selector:
entity:
domain: weather
wintermode:
name: Wintermode
description: "The ouside temperature needs to be below this to activate wintermode. (Default = 16°C)"
default: 16
selector:
number:
step: 0.5
min: 0
max: 150
unit_of_measurement: "°C or °F"
wintermode_delay:
name: Wintermode Delay
description: "Time the outside temperature neeeds to stay above the wintermode temperature to turn the heating off."
default: 30
selector:
number:
mode: box
min: 1
max: 86400
unit_of_measurement: minutes
thermostat:
name: Thermostat
selector:
entity:
domain: climate
trigger:
- platform: state
entity_id: !input window_sensor_1
to: 'off'
from: 'on'
for: !input window_1_delay
- platform: state
entity_id: !input window_sensor_1
to: 'on'
from: 'off'
for: !input window_1_delay
- platform: state
entity_id: !input window_sensor_2
to: 'off'
from: 'on'
for: !input window_2_delay
- platform: state
entity_id: !input window_sensor_2
to: 'on'
from: 'off'
for: !input window_2_delay
- platform: state
entity_id: !input window_sensor_3
to: 'off'
from: 'on'
for: !input window_3_delay
- platform: state
entity_id: !input window_sensor_3
to: 'on'
from: 'off'
for: !input window_3_delay
- platform: state
entity_id: !input window_sensor_4
to: 'off'
from: 'on'
for: !input window_4_delay
- platform: state
entity_id: !input window_sensor_4
to: 'on'
from: 'off'
for: !input window_4_delay
- platform: numeric_state
entity_id: !input weather
attribute: temperature
below: !input wintermode
for: !input wintermode_delay
- platform: numeric_state
entity_id: !input weather
attribute: temperature
above: !input wintermode
for: !input wintermode_delay
action:
- choose:
- conditions:
- condition: and
conditions:
- condition: state
entity_id: !input window_sensor_1
state: 'off'
- condition: state
entity_id: !input window_sensor_2
state: 'off'
- condition: state
entity_id: !input window_sensor_3
state: 'off'
- condition: state
entity_id: !input window_sensor_4
state: 'off'
- condition: numeric_state
entity_id: !input weather
attribute: temperature
below: !input wintermode
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: heat
entity_id: !input thermostat
- conditions:
- condition: or
conditions:
- condition: state
entity_id: !input window_sensor_1
state: 'on'
- condition: state
entity_id: !input window_sensor_2
state: 'on'
- condition: state
entity_id: !input window_sensor_3
state: 'on'
- condition: state
entity_id: !input window_sensor_4
state: 'on'
- condition: numeric_state
entity_id: !input weather
attribute: temperature
above: !input wintermode
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: 'off'
entity_id: !input thermostat
default: []