forked from matt8707/hass-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotify_toast.yaml
193 lines (182 loc) · 4.97 KB
/
notify_toast.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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
notify:
- name: all_devices
platform: group
services:
- service: mobile_app_iphone
- service: mobile_app_mattias_imac
- service: mobile_app_sanja_iphone
homeassistant:
customize:
binary_sensor.badrum_motion_motion:
friendly_name: badrummet
binary_sensor.garderob_motion_motion:
friendly_name: klädkammaren
binary_sensor.wemo_motion:
friendly_name: vardagsrummet
input_datetime:
sleep_notify_torrent:
name: Pausa notiser ett dygn
has_date: true
has_time: true
automation:
- alias: toast
id: '3161036041566'
mode: parallel
trigger:
platform: state
entity_id:
- binary_sensor.garderob_motion_motion
- binary_sensor.badrum_motion_motion
- binary_sensor.wemo_motion
from: 'off'
to: 'on'
action:
service: browser_mod.notification
data:
duration: 3000
message: >
Rörelse detekterat i {{ trigger.to_state.name }}
- alias: dismiss_lovelace_updated
id: '1309195316329'
mode: restart
trigger:
platform: event
event_type: lovelace_updated
action:
repeat:
count: 5
sequence:
- delay: 0.5
- service: browser_mod.notification
data:
duration: 1
message: ' '
- alias: waste_collection
id: '5611101897022'
mode: single
max_exceeded: silent
trigger:
platform: calendar
event: start
entity_id: calendar.sophamtning
offset: "-09:00:00"
condition:
condition: state
entity_id: binary_sensor.sovrum_contact_contact
state: 'on'
action:
- service: notify.all_devices
data:
title: >
{{ '\u267B' }} Sophämtning imorgon
message: Stäng fönstret!
- delay:
seconds: 5
- alias: ios_notify_hass_update
id: '7958228563778'
trigger:
platform: state
entity_id:
- sensor.docker_hub
- sensor.docker_hub_beta
condition: >
{{ state_attr('sensor.template_updates', 'home_assistant') == 1 }}
action:
- service: homeassistant.update_entity
target:
entity_id:
- sensor.hass_release_notes
- sensor.hass_release_notes_beta
- delay:
minutes: 15
- service: notify.mobile_app_iphone
data:
title: >
{{ states('sensor.docker_hub_beta') if version(installed).beta
else states('sensor.docker_hub') }} tillgänglig {{ '\U0001F389' }}
message: Håll in för att uppdatera
data:
url: https://www.home-assistant.io/latest-release-notes/
actions:
- action: START_WATCHTOWER
title: Uppdatera
- alias: ios_notify_hass_update_action
id: '0694774018396'
trigger:
platform: event
event_type: mobile_app_notification_action
event_data:
action: START_WATCHTOWER
action:
service: switch.turn_on
target:
entity_id: switch.docker_watchtower
- alias: notify_completed_torrent
id: '5814485236724'
mode: parallel
max: 10
trigger:
platform: event
event_type: transmission_downloaded_torrent
action:
- service: notify.all_devices
data:
title: Torrent nedladdad
message: >
{{ trigger.event.data.name }}
data:
actions:
- action: SLEEP_TORRENT
title: Pausa notiser ett dygn...
- alias: sleep_notify_completed_torrent
id: '0468306222206'
trigger:
platform: event
event_type: mobile_app_notification_action
event_data:
action: SLEEP_TORRENT
action:
- service: input_datetime.set_datetime
target:
entity_id: input_datetime.sleep_notify_torrent
data:
datetime: >
{{ as_local(state_attr('automation.notify_completed_torrent',
'last_triggered') + timedelta(days=1)) }}
- service: automation.turn_off
target:
entity_id: automation.notify_completed_torrent
- alias: datetime_notify_completed_torrent
id: '9998894466715'
trigger:
platform: time
at: input_datetime.sleep_notify_torrent
action:
service: automation.turn_on
target:
entity_id: automation.notify_completed_torrent
- alias: remove_completed_torrent
id: '2046215097181'
mode: parallel
max: 25
trigger:
platform: event
event_type: transmission_downloaded_torrent
action:
- service: transmission.stop_torrent
data:
name: Transmission
id: >
{{ trigger.event.data.id }}
- delay:
minutes: 1
- service: homeassistant.update_entity
target:
entity_id: sensor.plex_recently_added
- delay:
minutes: 10
- service: transmission.remove_torrent
data:
name: Transmission
id: >
{{ trigger.event.data.id }}