Changing Led Indicator/Strip Color on a Switch from Home Assistant Scene or Automation?

I’m playing around with changing the led indicator/strip of my red and black series switches - for this post, trying to change the led color via a scene or automation. I know this can be done via zwavejs manually but I’m trying to automate this (i.e. indicator for alarm, weather, motion, whatever). From what I can see I should be able to use set configuration parameter from yaml to do this. Interestingly there seems to be no way to control config parameters from a HA scene, so I’ trying it in an automation where I can see that. I created a dummy automation and right now only fiddling with the action piece (for testing I run the automation manually). My yaml for the action looks like this (for my black series dimmer):

device_id: 65f86ef6b6087fd2d8b1d6707148f3a9
domain: zwave_js
type: set_config_parameter
parameter: 13
bitmask: null
subtype: 21-112-0-13 (LED Indicator Color)
value: 25

I run the action and nothing happens. I tried something similar with a red series on/off (I think the parameter is 5 for that device). Note, I used the visual editor and just copied it as yaml for the purpose of this post. Could be the way HA is setting up the yaml is incorrect (I think I remember reading we need to manipulate the bitmask but I cannot find and info about that).

Any help would be appreciated!

FYI - I did see a post that possibly this is easier in Node Red so that’s my next stop, but would like to see how to do this straight from within HA first.

Try removing the bitmask and subtype. It also doesn’t look right but I don’t have access until tonight to look at what gets created or how it gets created in the visual editor. Something like this seems more correct to me.

service: zwave_js.set_config_parameter
target:
  entity_id: light.xxxx
data:
  parameter: 13
  value: 25

Of course, put your light entity in there.

1 Like

Thanks @PJF that worked! Seems like I popped your yaml and and updated with my entity ID and ran it - works great. I converted it to visual editor (and also by looking at the yaml) is that it’s calling a service

It appears what I tried (using the device and setting config parameters) doesn’t work - what I used below:

1 Like

Did the first way you tried change the color when you pressed that button to do it in the bottom right? I forget the text on it.

I can only recall seeing service calls in automations. There might be other action types that work though.

It should work with the device, but that number is pretty useless for knowing which device it is changing.

Hmm, I don’t have a button to test in the button right of the action or the overall automation. I have to go back to the automation list and click “run action” from there.

I see I’m going to have to step up my understanding of YAML as it’s going to make things so much easier

1 Like

Oh, you’re in the automation editor maybe??? In the developer tools\Service you can put in a service and there is a button to test it. Then, you can switch to YAML to get the code.

1 Like

correct I was in automation - and yet again learned something new :slight_smile: - The services tab under developer tools is pretty cool.

I have much to learn Obi Wan!

1 Like