forked from SmartThingsCommunity/SmartThingsPublic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathremote2
115 lines (106 loc) · 3.23 KB
/
remote2
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
blueprint:
name: RGBGenie 12 button
description: Create automations for the RGBGenie
domain: automation
input:
rgb_genie_device:
name: RGB Genie
description: "RGB Genie device"
selector:
device:
integration: zha
manufacturer: RGBgenie
model: RGBgenie ZB-5001
button_1_on:
name: Button 1 - On
description: "Action to run, when the button is pressed."
default: []
selector:
action: {}
button_1_off:
name: Button 1 - Off
description: "Action to run, when the button is pressed."
default: []
selector:
action: {}
button_2_on:
name: Button 2 - On
description: "Action to run, when the button is pressed."
default: []
selector:
action: {}
button_2_off:
name: Button 2 - Off
description: "Action to run, when the button is pressed."
default: []
selector:
action: {}
button_3_on:
name: Button 3 - On
description: "Action to run, when the button is pressed."
default: []
selector:
action: {}
button_3_off:
name: Button 3 - Off
description: "Action to run, when the button is pressed."
default: []
selector:
action: {}
button_4_on:
name: Button 4 - On
description: "Action to run, when the button is pressed."
default: []
selector:
action: {}
button_4_off:
name: Button 4 - Off
description: "Action to run, when the button is pressed."
default: []
selector:
action: {}
button_5_on:
name: Button 5 - On
description: "Action to run, when the button is pressed."
default: []
selector:
action: {}
button_5_off:
name: Button 5 - Off
description: "Action to run, when the button is pressed."
default: []
selector:
action: {}
mode: single
max_exceeded: silent
trigger:
- platform: event
event_type: zha_event
variables:
device_id: !input rgb_genie_device
condition: "{{ trigger.event.data.device_id == device_id }}"
action:
- variables:
button_id: "{{ trigger.event.data.endpoint_id }}"
command: "{{ trigger.event.data.command }}"
- choose:
- conditions: '{{ button_id == 1 and command == "on"}}'
sequence: !input "button_1_on"
- conditions: '{{ button_id == 2 and command == "on"}}'
sequence: !input "button_2_on"
- conditions: '{{ button_id == 3 and command == "on"}}'
sequence: !input "button_3_on"
- conditions: '{{ button_id == 4 and command == "on"}}'
sequence: !input "button_4_on"
- conditions: '{{ button_id == 5 and command == "on"}}'
sequence: !input "button_5_on"
- conditions: '{{ button_id == 1 and command == "off"}}'
sequence: !input "button_1_off"
- conditions: '{{ button_id == 2 and command == "off"}}'
sequence: !input "button_2_off"
- conditions: '{{ button_id == 3 and command == "off"}}'
sequence: !input "button_3_off"
- conditions: '{{ button_id == 4 and command == "off"}}'
sequence: !input "button_4_off"
- conditions: '{{ button_id == 5 and command == "off"}}'
sequence: !input "button_5_off"