-
Notifications
You must be signed in to change notification settings - Fork 0
/
mysensors_automation.yaml
147 lines (139 loc) · 4.15 KB
/
mysensors_automation.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
#http://patorjk.com/software/taag/#p=display&f=Graffiti&t=Type%20Something%20
# ___ _ ____ __ _ __
# / _ | (_) ____ / __ \ __ __ ___ _ / / (_) / /_ __ __
# / __ | / / / __/ / /_/ // // // _ `/ / / / / / __/ / // /
# /_/ |_|/_/ /_/ \___\_\\_,_/ \_,_/ /_/ /_/ \__/ \_, /
# /___/
## Send Notificatin when air quality is bad
- alias: 'Air quality'
trigger:
- plateforme: state
entity_id: binary_sensor.air_quality
above: '30'
for:
minutes: 1
action:
- service: shell_command.h_police_lights_single
- service: notify.firetv
data_template:
title: "Bad air"
message: "Open the window"
data:{
"position":"center",
"duration":2,
"transparency":"0%",
"color": "red",
"interrupt": 1
}
- service: notify.html5
data_template:
title: "Bad air"
message: "Open the window"
data:{
actions: [
{
"action": "stop_police_lights",
"title": "Stop police light"
}
]
}
- service: persistent_notification.create
data:
title: "Bad air"
message: "Open the window"
## Stop police lights when air turns better
- alias: 'Air quality'
trigger:
- plateforme: state
entity_id: binary_sensor.air_quality
from: '30'
to: '29'
for:
minutes: 1
action:
- service: shell_command.h_hyperion_off
## Stop police lights when user clicks button
- alias: 'Bad air quality button clicked'
trigger:
platform: event
event_type: html5_notification.clicked
event_data:
action: stop_police_lights
action:
- service: shell_command.h_hyperion_off
# ___ _
# / _ | ___ _ __ __ ___ _ ____ (_) __ __ __ _
# / __ |/ _ `// // // _ `/ / __/ / / / // / / ' \
# /_/ |_|\_, / \_,_/ \_,_/ /_/ /_/ \_,_/ /_/_/_/
# /_/
## Send Notificatin when water temperature high
- alias: 'Aquarium temperature'
trigger:
- plateforme: state
entity_id: binary_sensor.aquarium_temperature
above: '22'
action:
- service: persistent_notification.create
data:
title: "Aquarium too hot"
message: "Cool down the aquarium water"
- service: notify.html5
data_template:
title: "Aquarium too hot"
message: "Cool down the aquarium water"
## Send Notificatin when water quality is bad
- alias: 'Aquarium water quality'
trigger:
- plateforme: state
entity_id: binary_sensor.aquarium_water_quality
below: '80'
for:
hours: 1
action:
- service: persistent_notification.create
data:
title: "Aquarium is dirty"
message: "Clean the aquarium"
- service: notify.html5
data_template:
title: "Aquarium is dirty"
message: "Clean the aquarium"
## Send Notificatin when water level is low
- alias: 'Aquarium water level'
trigger:
- plateforme: state
entity_id: binary_sensor.aquarium_water_level
below: '20'
for:
minutes: 10
action:
- service: persistent_notification.create
data:
title: "Aquarium water is low"
message: "Fill up aquarium"
- service: notify.html5
data_template:
title: "Aquarium water is low"
message: "Fill up aquarium"
# ___ __ __
# / _ \ / / ___ _ ___ / /_ ___
# / ___/ / / / _ `/ / _ \/ __/ (_-<
# /_/ /_/ \_,_/ /_//_/\__/ /___/
#
## Send Notificatin when soil moisture is low
- alias: 'Plant soil moisture'
trigger:
- plateforme: state
entity_id: binary_sensor.plant_moisture_1
below: '60'
for:
hours: 1
action:
- service: persistent_notification.create
data:
title: "Plant 1 too dry"
message: "Water plant 1"
- service: notify.html5
data_template:
title: "Plant 1 too dry"
message: "Water plant 1"