-
Notifications
You must be signed in to change notification settings - Fork 185
/
climate.yaml
executable file
·134 lines (127 loc) · 3.82 KB
/
climate.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
---
#-
# _ _ _
# ___| (_)_ __ ___ __ _| |_ ___
# / __| | | '_ ` _ \ / _` | __/ _ \
# | (__| | | | | | | | (_| | || __/
# \___|_|_|_| |_| |_|\__,_|\__\___|
#
#
#- from github.com/basnijholt/home-assistant-config
- alias: "Climate: turn on the heating 30 min before waking up"
trigger:
platform: template
value_template: >
{{ states("sensor.time")[0:5] == states("sensor.half_hour_before_alarm") }}
condition:
condition: state
entity_id:
- input_boolean.alarm_clock
- input_boolean.automatic_temperature
state: "on"
action:
service: script.set_high_temperature
- alias: "Climate: turn on the heating when going home"
trigger:
platform: numeric_state
entity_id: proximity.home
below: 6
above: 1
condition:
- condition: state
entity_id: input_boolean.automatic_temperature
state: "on"
- condition: time
after: "16:00:00"
before: "22:00:00"
- "{{ is_state_attr('proximity.home', 'dir_of_travel', 'towards') }}"
- "{{ not is_state_attr('climate.thermostat', 'temperature', states('input_number.temperature_high')) }}"
- condition: state
entity_id: binary_sensor.no_one_home
state: "on"
action:
- service: script.set_high_temperature
- service: notify.all_iphones
data:
title: "Climate"
message: "Automatically turned on the heating 🥵℃"
- alias: "Climate: turn off the heating at 22:00"
trigger:
platform: time
at: "22:00"
condition:
- condition: state
entity_id: input_boolean.automatic_temperature
state: "on"
- condition: state
entity_id: binary_sensor.no_one_home
state: "off"
- "{{ not is_state_attr('climate.thermostat', 'temperature', states('input_number.temperature_low')|float) }}"
action:
- service: script.set_low_temperature
- service: notify.all_iphones
data:
message: "Turned off the heating 🥶, click to turn it on again?"
data:
push:
category: turn_on_heating
- alias: "Climate: turn on heating again after notification"
trigger:
platform: event
event_type: ios.notification_action_fired
event_data:
actionName: TURN_ON_HEATING
action:
service: script.set_high_temperature
- alias: "Climate: set outside temperature every hour"
trigger:
platform: time_pattern
hours: "/1"
action:
service: mqtt.publish
data:
topic: actions/otmonitor/outside
payload_template: >
{{ state_attr("weather.huis", "temperature") }}
- alias: "Climate: warning when heating on and living room door open"
trigger:
platform: state
entity_id: binary_sensor.openclose_living_room
to: "on"
for: "00:05:00"
condition: "{{ state_attr('climate.thermostat', 'temperature') >= 18 }}"
action:
- repeat:
while:
- condition: state
entity_id: binary_sensor.openclose_living_room
state: "on"
- condition: template
value_template: "{{ repeat.index <= 6 }}"
sequence:
- service: notify.all
data:
title: "Climate"
message: "The living room door is open and the heating is on! ⚠️ Warning #{{ repeat.index }}!"
- delay: "00:05:00"
- condition: state
entity_id: binary_sensor.openclose_living_room
state: "on"
- service: notify.all
data:
title: "Climate"
message: "Turning off the heating!"
- service: climate.set_temperature
entity_id: climate.thermostat
data:
temperature: >
{{ states("input_number.temperature_low") }}
- alias: "Climate: set temperature setpoint to 50 °C"
trigger:
platform: time_pattern
hours: "/2"
action:
service: mqtt.publish
data:
topic: actions/otmonitor/maxdhwsetpt
payload: "50"