-
Notifications
You must be signed in to change notification settings - Fork 0
/
4buttonlidlremote.yaml
76 lines (76 loc) · 2.43 KB
/
4buttonlidlremote.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
75
76
blueprint:
name: ZHA - Lidl 4 Button Remote
description: Automate your Lidl 4 Button Remote using ZHA events.
domain: automation
input:
Lidl_4Button_Remote:
name: Lidl 4Button Remote
description: Select the Lidl 4 Button Remote to use
selector:
device:
integration: zha
manufacturer: _TYZB01_bngwdjsr
model: TS1001
multiple: false
button_one_short_press:
name: Single Press
description: Action to run on button 1 (OFF/0) single press
default: []
selector:
action: {}
button_two_short_press:
name: Single Press
description: Action to run on button 2 (ON/1) single press
default: []
selector:
action: {}
button_three_short_press:
name: Single Press
description: Action to run on button 3 (Bright) single press
default: []
selector:
action: {}
button_four_short_press:
name: Single Press
description: Action to run on button 4 (Dim) single press
default: []
selector:
action: {}
button_three_long_press:
name: B3 Long Press
description: Action to run on button 3 (Bright) longpress
default: []
selector:
action: {}
button_four_long_press:
name: B4 Long Press
description: Action to run on button 4 (Dim) longpress
default: []
selector:
action: {}
mode: restart
max_exceeded: silent
trigger:
- platform: event
event_type: zha_event
event_data:
device_id: !input 'Lidl_4Button_Remote'
action:
- variables:
command: '{{ trigger.event.data.command }}'
args: '{{ trigger.event.data.args }}'
stepmode: '{{trigger.event.data.params.step_mode}}'
movemode: '{{trigger.event.data.params.move_mode}}'
- choose:
- conditions: '{{ command == ''off'' }}'
sequence: !input 'button_one_short_press'
- conditions: '{{ command == ''on'' }}'
sequence: !input 'button_two_short_press'
- conditions: '{{ command == ''step'' and stepmode == ''StepMode.Up'' }}'
sequence: !input 'button_three_short_press'
- conditions: '{{ command == ''step'' and stepmode == ''StepMode.Down'' }}'
sequence: !input 'button_four_short_press'
- conditions: '{{ command == ''move'' and movemode == ''MoveMode.Up'' }}'
sequence: !input 'button_three_long_press'
- conditions: '{{ command == ''move'' and movemode == ''MoveMode.Down'' }}'
sequence: !input 'button_four_long_press'