-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsmartheating.yaml
154 lines (154 loc) · 4.13 KB
/
smartheating.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
blueprint:
name: Heating Control with Window Sensor
description: Control your heating with options for group home, if temp is below
a specific value, set temp, and heating between specific times.
source_url: https://github.com/thefunkygibbon/homeassistant/blob/main/smartheating.yaml
domain: automation
input:
heating:
name: Climate Device
description: The climate device to use.
selector:
entity:
domain: climate
temp_sensor:
name: Temperature Sensor
description: Temperature Sensor to check.
selector:
entity:
domain: sensor
device_class: temperature
window_sensor_1:
name: Door or Window Sensor
description: Check if window or door is open
selector:
entity:
domain: binary_sensor
groupname:
name: Person Group
description: The group of people that have to be home.
default: []
selector:
entity:
domain: group
group_presence:
name: Group Presence
description: Heat only if Person of Group was present in a given amount of time
default: 07:30:00
selector:
time: {}
heating_boolean:
name: Heating Boolean
description: Check if Boolean is off for automation
selector:
entity:
domain: input_boolean
min_temp:
name: Minimum Temp
description: If temperature is below this value and someone is home, It turns
heating on.
default: 15
selector:
number:
min: 5.0
max: 30.0
step: 0.1
mode: slider
set_temp:
name: Temperature Target
description: If the heating turns on, It heats to this target temperature.
default: 20
selector:
number:
min: 5.0
max: 30.0
step: 0.1
mode: slider
energy_temp:
name: Energy Saving Temperature
description: When away, keep the Energy Saving Temperature
default: 17
selector:
number:
min: 5.0
max: 30.0
step: 0.1
mode: slider
time_after:
name: Time After
description: After this time the heating turns on, so it's warm in the morning
default: 08:30:00
selector:
time: {}
time_before:
name: Time Before
description: After this time the heating turns off, This to prevent the heating
is on in the middle of the night
default: '17:00:00'
selector:
time: {}
variables:
set_temp: !input 'set_temp'
energy_temp: !input 'energy_temp'
window_sensor_1: !input 'window_sensor_1'
heating_boolean: !input 'heating_boolean'
trigger:
- platform: homeassistant
event: start
- platform: event
event_type: automation_reloaded
- platform: time_pattern
minutes: /1
condition:
- condition: state
entity_id: !input 'heating_boolean'
state: 'off'
action:
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.workday_sensor
state: "on"
- condition: numeric_state
entity_id: !input 'temp_sensor'
below: !input 'min_temp'
- condition: time
before: !input 'time_before'
after: !input 'time_after'
- condition: state
entity_id: !input 'window_sensor_1'
state: 'off'
- condition: not
conditions:
- condition: state
entity_id: !input 'groupname'
for: !input 'group_presence'
state: not_home
sequence:
- service: climate.turn_on
data:
entity_id: !input 'heating'
- service: climate.set_temperature
data:
entity_id: !input 'heating'
hvac_mode: heat
temperature: '{{ set_temp }}'
- conditions:
- condition: state
entity_id: !input 'window_sensor_1'
state: 'on'
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: 'off'
entity_id: !input 'heating'
default:
- service: climate.set_preset_mode
data:
entity_id: !input 'heating'
preset_mode: Energy heat
- service: climate.set_temperature
data:
entity_id: !input 'heating'
temperature: '{{ energy_temp }}'
mode: single