-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaqara-wireless-remote-switch-single-rocker-2016.yaml
73 lines (73 loc) · 2.3 KB
/
aqara-wireless-remote-switch-single-rocker-2016.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
---
blueprint:
name: '[ZHA] Aqara Wireless Remote Switch (Single Rocker) (2016 version) (WXKG03LM)'
description: Automate your Aqara Wireless Remote Switch (Single Rocker) (2016 version) using ZHA events.
domain: automation
input:
aqara_switch:
name: Switch
description: Mijia Wireless Switch
selector:
device:
integration: zha
manufacturer: LUMI
model: lumi.sensor_86sw1
remote_button_short_press:
name: Single Press
description: Action to run on single press
default: []
selector:
action: {}
# remote_button_hold_press:
# name: Hold
# description: Action to run on hold
# default: []
# selector:
# action: {}
# hold_delay:
# name: Time interval for hold detection, in seconds
# description: Time to wait until hold_press is activated
# default: 0.60
# selector:
# number:
# min: 0.15
# max: 2.5
# unit_of_measurement: seconds
# step: 0.05
# mode: slider
mode: restart
max_exceeded: silent
trigger:
- platform: event
event_type: zha_event
event_data:
device_id: !input 'aqara_switch'
action:
- variables:
attribute_name: '{{ trigger.event.data.args.attribute_name }}'
value: '{{ trigger.event.data.args.value }}'
command: '{{ trigger.event.data.command }}'
- choose:
- conditions:
- '{{ attribute_name == ''on_off'' }}'
- '{{ value == ''Bool.true'' }}'
sequence: !input 'remote_button_short_press'
# sequence:
# - wait_for_trigger:
# - platform: event
# event_type: zha_event
# event_data:
# device_id: !input 'aqara_switch'
# command: 'attribute_updated'
# args:
# attribute_id: 0
# attribute_name: on_off
# value: 0
# continue_on_timeout: true
# timeout: !input 'hold_delay'
# - choose:
# - conditions:
# - condition: template
# value_template: '{{ not wait.trigger }}'
# sequence: !input 'remote_button_hold_press'
# default: !input 'remote_button_short_press'