-
Notifications
You must be signed in to change notification settings - Fork 57
/
tamper_notify.yaml
35 lines (32 loc) · 1.05 KB
/
tamper_notify.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
#
# Warn someone if the tamper flag has changed
#
# @subscribe input_boolean.tamper_detected
#
- id: tamper_detection_notify
alias: "Tamper Detection NOTIFY"
trigger:
# When the tamper flag has changed.
- platform: state
entity_id: input_boolean.tamper_detected
action:
# Warn someone to take action.
- service: notify.text
data:
title: "Home security issue"
message: |
A perimeter device has been tampered with.
Device: {{ states('variable.tamper_detected') }}.
Current state: {% if is_state('input_boolean.tamper_detected', 'on') -%}
Tampered{% else %}Reset{% endif %}.
# Pin a warning message in the frontend.
- condition: state
entity_id: input_boolean.tamper_detected
state: 'on'
- service: persistent_notification.create
data:
notification_id: security
title: "Home security issue"
message: |
A perimeter device has been tampered with at location:
<strong>{{ states('variable.tamper_detected') }}</strong>.