-
Notifications
You must be signed in to change notification settings - Fork 33
/
homematicip_local-actions-for-2-button.yaml
68 lines (68 loc) · 2.33 KB
/
homematicip_local-actions-for-2-button.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
blueprint:
name: Actions for 2-Button Homematic(IP) device
description:
When a button is pressed, the defined actions will be executed. Please
keep in mind, that long-press actions might be executed multiple times, according
to your configured minimum duration for long press. This can be configured in
your CCU.
Tested with HmIP-BSM, HmIP-BDT, HmIP-BSL, HmIP-WRC2. Should work with other device too.
v2022-10-28
domain: automation
source_url: https://github.com/sukramj/custom_homematic/blob/devel/blueprints/automation/homematicip_local-actions-for-2-button.yaml
input:
remote:
name: 2-Button Device
description: Please select a 2-Button device of your Homematic(IP) Local integration.
selector:
device:
integration: homematicip_local
action_top_short:
name: Action
description: Top-Button, Short Press
default: []
selector:
action: {}
action_top_long:
name: Action
description: Top-Button, Long Press
default: []
selector:
action: {}
action_bottom_short:
name: Action
description: Bottom-Button, Short Press
default: []
selector:
action: {}
action_bottom_long:
name: Action
description: Bottom-Button, Long Press
default: []
selector:
action: {}
trigger:
- platform: event
event_type: homematic.keypress
event_data:
device_id: !input "remote"
condition: []
action:
- choose:
- conditions:
- condition: template
value_template: "{{ trigger.event.data.type == 'press_short' and trigger.event.data.subtype == 2 }}"
sequence: !input "action_top_short"
- conditions:
- condition: template
value_template: "{{ trigger.event.data.type == 'press_long' and trigger.event.data.subtype == 2 }}"
sequence: !input "action_top_long"
- conditions:
- condition: template
value_template: "{{ trigger.event.data.type == 'press_short' and trigger.event.data.subtype == 1 }}"
sequence: !input "action_bottom_short"
- conditions:
- condition: template
value_template: "{{ trigger.event.data.type == 'press_long' and trigger.event.data.subtype == 1 }}"
sequence: !input "action_bottom_long"
mode: parallel
max: 10