/
Inovelli_Set_LED_Color.yaml
192 lines (183 loc) · 6.45 KB
/
Inovelli_Set_LED_Color.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
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
blueprint:
name: Inovelli LED Color Change
description: Create automations for Inovelli dimmers and switches to set their LED color. Specific to Z-Wave devices using Z-Wave JS and Zigbee devices using ZHA.
domain: automation
input:
inovelli_dimmer:
name: Inovelli Dimmer
description: List of available Inovelli dimmers.
default: {}
selector:
target:
device:
- integration: zwave_js
manufacturer: Inovelli
model: LZW31-SN
- integration: zwave_js
manufacturer: Inovelli
model: LZW31
inovelli_switch:
name: Inovelli On/Off Switch
description: List of available Inovelli On/Off switches.
default: {}
selector:
target:
device:
- integration: zwave_js
manufacturer: Inovelli
model: LZW30-SN
- integration: zwave_js
manufacturer: Inovelli
model: LZW30
inovelli_fan_light_combo:
name: Inovelli Fan/Light Combo
description: List of available Inovelli fan/fight combo switches.
default: {}
selector:
target:
device:
integration: zwave_js
manufacturer: Inovelli
model: LZW36
inovelli_red_2_in_1:
name: Inovelli Red 2-in-1 Switch
description: List of available Inovelli Red 2-in-1 switches.
default: {}
selector:
target:
device:
integration: zwave_js
manufacturer: Inovelli
model: VZW31-SN
inovelli_blue_2_in_1:
name: Inovelli Blue 2-in-1 Switch
description: List of available Inovelli Blue 2-in-1 switches.
default: []
selector:
target:
device:
integration: zha
manufacturer: Inovelli
model: VZM31-SN
color:
name: Color
description:
"Select the LED Color -
Off: 0 |
Red: 1 |
Orange: 21 |
Yellow: 42 |
Green: 85 |
Cyan: 127 |
Teal: 145 |
Blue: 170 |
Purple: 195 |
Light Pink: 220 |
Pink: 234 |
White: 255"
selector:
number:
min: 0
max: 255
variables:
color: !input color
inovelli_dimmer: !input inovelli_dimmer
inovelli_switch: !input inovelli_switch
inovelli_fan_light_combo: !input inovelli_fan_light_combo
inovelli_red_2_in_1: !input inovelli_red_2_in_1
inovelli_blue_2_in_1: !input inovelli_blue_2_in_1
trigger: []
action:
- choose:
- conditions:
- condition: template
value_template: 'True'
sequence:
repeat:
for_each:
- inovelli_switch
- inovelli_dimmer
- inovelli_fan_light_combo
- inovelli_red_2_in_1
- inovelli_blue_2_in_1
sequence:
choose:
- conditions: "{{ inovelli_dimmer|length > 0 and repeat.item == 'inovelli_dimmer' }}"
sequence:
# Set color for dimmers
- service: zwave_js.multicast_set_value
data:
command_class: '112'
property: '13'
value: "{{ color }}"
target: !input inovelli_dimmer
- conditions: "{{ inovelli_switch|length > 0 and repeat.item == 'inovelli_switch' }}"
sequence:
# Set color for switches
- service: zwave_js.multicast_set_value
data:
command_class: '112'
property: '5'
value: "{{ color }}"
target: !input inovelli_switch
- conditions: "{{ inovelli_fan_light_combo|length > 0 and repeat.item == 'inovelli_fan_light_combo' }}"
sequence:
# Set color for Fan/Light combo light
- service: zwave_js.multicast_set_value
data:
command_class: '112'
property: '18'
value: "{{ color }}"
target: !input inovelli_fan_light_combo
- conditions: "{{ inovelli_fan_light_combo|length > 0 and repeat.item == 'inovelli_fan_light_combo' }}"
sequence:
# Set color for Fan/Light combo fan
- service: zwave_js.multicast_set_value
data:
command_class: '112'
property: '20'
value: "{{ color }}"
target: !input inovelli_fan_light_combo
- conditions: "{{ inovelli_red_2_in_1|length > 0 and repeat.item == 'inovelli_red_2_in_1' }}"
sequence:
# Set color for Red 2-in-1 on
- service: zwave_js.multicast_set_value
data:
command_class: '112'
property: '95'
value: "{{ color }}"
target: !input inovelli_red_2_in_1
# Set color for Red 2-in-1 off
- service: zwave_js.multicast_set_value
data:
command_class: '112'
property: '96'
value: "{{ color }}"
target: !input inovelli_red_2_in_1
- conditions: "{{ inovelli_blue_2_in_1|length > 0 and repeat.item == 'inovelli_blue_2_in_1' }}"
sequence:
- repeat:
for_each: "{{ inovelli_blue_2_in_1.device_id }}"
sequence:
# Set color for Blue 2-in-1 off
- service: zha.set_zigbee_cluster_attribute
data:
cluster_type: in
endpoint_id: 1
cluster_id: 64561
attribute: 96
manufacturer: "4655"
ieee: >
{{ (device_attr(repeat.item, "identifiers")|list).0.1 }}
value: "{{ color }}"
# Set color for Blue 2-in-1 on
- service: zha.set_zigbee_cluster_attribute
data:
cluster_type: in
endpoint_id: 1
cluster_id: 64561
attribute: 95
manufacturer: "4655"
ieee: >
{{ (device_attr(repeat.item, "identifiers")|list).0.1 }}
value: "{{ color }}"