-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdivera-blueprint.yaml
74 lines (74 loc) · 1.91 KB
/
divera-blueprint.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
blueprint:
name: Divera alarm automation
description: Trigger some actions when a new Divera alarm is triggered.
domain: automation
author: fwmarcel
source_url: https://github.com/fwmarcel/home-assistant-divera/blob/main/divera-blueprint.yaml
homeassistant:
min_version: 2022.4.0
input:
divera_sensor:
name: Divera sensor
description: The sensor which show the current divera alarm state
selector:
entity:
integration: divera
domain:
- sensor
multiple: true
self_addressed:
name: Self addressed
description: Check if I was addressed myself
selector:
boolean: {}
default: true
abort_keyword:
name: (optional) Abort keyword
description:
"(optional) Alarm title/keyword when the action should not be triggered.
For example: Probealarm"
default: ""
selector:
text:
multiline: false
multiple: false
target_action:
name: Action
description: What should be done, when a new divera alarm is triggered?
selector:
action: {}
mode: parallel
max: 10
variables:
self_addressed: !input self_addressed
trigger:
- platform: state
entity_id: !input divera_sensor
attribute: id
not_to:
- unknown
condition:
condition: and
conditions:
- condition: not
conditions:
- condition: state
entity_id: !input divera_sensor
state:
- !input abort_keyword
- unknown
- condition: or
conditions:
- condition: template
value_template: "{{ not self_addressed }}"
- condition: state
entity_id: !input divera_sensor
attribute: self_addressed
state: true
- condition: state
entity_id: !input divera_sensor
attribute: closed
state: false
action:
- choose:
default: !input target_action