-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaqara_wireless_mini_switch.yaml
63 lines (59 loc) · 1.54 KB
/
aqara_wireless_mini_switch.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
blueprint:
name: Aqara Wireless Mini Switch
description: Automate your Aqara Wireless Mini Switch.
domain: automation
input:
aqara_wireless_mini_switch:
name: Aqara Wireless Mini Switch
selector:
device:
integration: zha
manufacturer: LUMI
model: lumi.remote.b1acn01
single_action:
name: Single Press
description: Action to run on single press
default: []
selector:
action:
double_action:
name: Double Press
description: Action to run on double press
default: []
selector:
action:
hold_action:
name: Long Press
description: Action to run when button is long pressed
default: []
selector:
action:
release_action:
name: Released
description: Action to run when button is released after a long press
default: []
selector:
action:
mode: restart
max_exceeded: silent
trigger:
- platform: event
event_type: zha_event
event_data:
device_id: !input aqara_wireless_mini_switch
action:
- variables:
command: "{{ trigger.event.data.command }}"
- choose:
- conditions:
- "{{ command == 'single' }}"
sequence: !input single_action
- conditions:
- "{{ command == 'double' }}"
sequence: !input double_action
- conditions:
- "{{ command == 'hold' }}"
sequence: !input hold_action
- conditions:
- "{{ command == 'release' }}"
sequence: !input release_action