The general guides for automating the LED strip on the red series switches has been to use the service zwave.set_config_parameter. Unfortunately, that service equivalent has been missing from OpenZWave…until now. HA 0.113 has added ozw.set_config_parameter which allows for scripted manipulation of the switch parameters.
The typical method is to creat a script with action type Call Service.
The service is now ozw.set_config_parameter.
And I the script I found from others (I’ll try to update with the source) is: (sorry for formatting, I’m on mobile)
1
data_template:
2
node_id: ‘{{node_id}}’
3
parameter: 8
4
size: 4
5
value: |
6
{% if color is number and color >= 0 and color <= 255 %}
7
{% set hx=color %}
8
{% elif color==“red” %}
9
{% set hx=1 %}
10
{% elif color==“orange” %}
11
{% set hx=21 %}
12
{% elif color==“green” %}
13
{% set hx=85 %}
14
{% elif color==“blue” %}
15
{% set hx=170 %}
16
{% elif color==“pink” %}
17
{% set hx=234 %}
18
{% elif color==“yellow” %}
19
{% set hx=42 %}
20
{% else %}
21
{% set hx=127 %}
22
{% endif %} {% if level is number and level >= 0 and level <= 10 %}
23
{% set lx=level256 %}
24
{% else %}
25
{% set lx = 10256 %}
26
{% endif %} {% if duration is number %}
27
{% if duration >= 0 and duration <= 255 %}
28
{% set dx = duration65536 %}
29
{% else %}
30
{% set dx = 1065536 %}
31
{% endif %}
32
{% elif duration == “on” %}
33
{% set dx = 25565536 %}
34
{% else %}
35
{% set dx = 1065536 %}
36
{% endif %} {% if effect is number and effect >= 0 and effect <= 4 %}
37
{% set ex = effect * 16777216 %}
38
{% elif effect==“off” %}
39
{% set ex = 0 %}
40
{% elif effect==“solid” %}
41
{% set ex = 1 * 16777216 %}
42
{% elif effect==“fast_blink” %}
43
{% set ex = 2 * 16777216 %}
44
{% elif effect==“strobe” %}
45
{% set ex = 2 * 16777216 %}
46
{% elif effect==“slow_blink” %}
47
{% set ex = 3 * 16777216 %}
48
{% else %}
49
{% set ex = 4 * 16777216 %}
50
{% endif %} {{(hx+lx+dx+ex) | int}}
Good to know! Are there any limitations to setting config parameters too many times?
I was thinking of setting the light strip color instead of using notifications for different scenes but was concerned that this would wear out the switch faster. I was also thinking of setting the default levels depending on the time of day so when the wife gets up at midnight the default is different than if it’s in the middle of the day.
Maybe I am just being paranoid… if config parameters were stored on an internal flash chip in the switch that only had some many writes and I change a config parameter say 2000 times a year, will that be a problem down the road?
This is the approach I’ve been using on Hubitat almost since day 1. I actually control the default led color through Node Red running on HA with my switches on Hubitat.
At first it was out of necessity since the LED notification wouldn’t stick if anybody manipulated the switch. That’s since been fixed through a firmware update but I still prefer this method over the notifications. Using notifications it comes on, then when somebody manipulates the switch it goes back to the default LED colour, then the notification turns on again. That switch from red to fading blue, to solid blue, back to red… drives my OCD insane lol
I’m using the Open Z-Wave 1.4 (Home Assistant’s default integrated Z-Wave) with 113.0 and ‘zwave.set_config_parameter’ still works. I’ve modified BrianHanifin’s script to support the two LED strips on LZW36. I could modify the service to a service_template and pick between zwave.set_config_parameter and ozw.set_config_parameter if there’s a way to detect which is being used.