-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathWindowOpenBlueprint.yml
119 lines (118 loc) · 3.22 KB
/
WindowOpenBlueprint.yml
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
#
# Home Assistant Automation Blueprint
#
# Automatically turns of heating if door or Windows is open for a specific amount of time
#
# Rev 2 with three Timers and two Notify Devices
# Modified by Johan Schelin, Mar. 2021
blueprint:
name: Notification to Close a Window or a Door
description: Notification to close windows if it is cold outside
domain: automation
input:
contact_sensor:
name: Contact Sensor
description: The window or door sensor that triggers the automation.
selector:
entity:
domain: binary_sensor
first_timer:
name: First timer
description: The first notification timer (in minutes).
default: 60
selector:
number:
min: 1.0
step: 5.0
max: 120.0
mode: slider
second_timer:
name: Second timer
description: The second notification timer (in minutes).
default: 120
selector:
number:
min: 30.0
step: 10.0
max: 240.0
mode: slider
third_timer:
name: Third timer
description: The first notification timer (in minutes).
default: 240
selector:
number:
min: 60.0
step: 30.0
max: 500.0
mode: slider
temperature:
name: Temperature
description: The outside temperature below which the notification should be
sent.
default: 20
selector:
number:
min: 0.0
step: 1.0
max: 25.0
mode: slider
device_identifier:
name: Device 1 to notify
description: 'The device to receive the notification; it needs to run the official Home
Assistant app to receive notifications.'
selector:
device:
integration: mobile_app
device_identifier2:
name: Device 2 to notify
description: 'The device to receive the notification; it needs to run the official Home
Assistant app to receive notifications.'
selector:
device:
integration: mobile_app
trigger:
- platform: state
entity_id: !input 'contact_sensor'
from: 'off'
to: 'on'
for:
hours: 0
minutes: !input 'first_timer'
seconds: 0
- platform: state
entity_id: !input 'contact_sensor'
from: 'off'
to: 'on'
for:
hours: 0
minutes: !input 'second_timer'
seconds: 0
- platform: state
entity_id: !input 'contact_sensor'
from: 'off'
to: 'on'
for:
hours: 0
minutes: !input 'third_timer'
seconds: 0
condition:
- condition: state
entity_id: !input 'contact_sensor'
state: 'on'
- condition: numeric_state
entity_id: weather.idvagen
attribute: temperature
below: !input 'temperature'
action:
- device_id: !input 'device_identifier'
domain: mobile_app
type: notify
message: Time to close {{trigger.to_state.attributes.friendly_name}}.
title: Close {{trigger.to_state.attributes.friendly_name}}!
- device_id: !input 'device_identifier2'
domain: mobile_app
type: notify
message: Time to close {{trigger.to_state.attributes.friendly_name}}.
title: Close {{trigger.to_state.attributes.friendly_name}}!
mode: single