-
Notifications
You must be signed in to change notification settings - Fork 185
/
climate.yaml
executable file
·152 lines (145 loc) · 4.38 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
---
#-
# _ _ _
# ___| (_)_ __ ___ __ _| |_ ___
# / __| | | '_ ` _ \ / _` | __/ _ \
# | (__| | | | | | | | (_| | || __/
# \___|_|_|_| |_| |_|\__,_|\__\___|
#
#
#- 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(0)) }}"
action:
- service: script.set_low_temperature
- service: notify.all_iphones
data:
message: "Turned off the heating 🥶, click to turn it on again?"
data:
actions:
- action: TURN_ON_HEATING
title: Turn on heating
activationMode: background
authenticationRequired: true
destructive: true
- wait_for_trigger:
platform: event
event_type: mobile_app_notification_action
event_data:
action: TURN_ON_HEATING
timeout: "00:00:20"
continue_on_timeout: false
- 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_bedroom
to: "on"
for: "00:05:00"
condition: "{{ state_attr('climate.thermostat', 'temperature') >= 18 }}"
action:
- repeat:
while:
- condition: state
entity_id: binary_sensor.openclose_bedroom
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_bedroom
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"
- alias: "Climate: automatically turn off spaceheater when no-one is in the guest room"
trigger:
- platform: time_pattern
minutes: "/10"
- platform: state
entity_id: binary_sensor.activity_in_guest_room
to: "off"
condition:
condition: state
entity_id: binary_sensor.activity_in_guest_room
state: "off"
action:
service: switch.turn_off
entity_id: switch.space_heater