HA + Red Dimmer - Setting LED brightness


I have a bit of a complex question, and so I appreciate your bearing with me. As a baseline, I am using Inovelli switches with ZwaveJS and Home Assistant, and it is working great. Let’s jump into the LED question:

Basic configuration:
I have turned off animations on my switch and set it up as a simple on/off switch. Hence, the LED on the switch is either bright or dim depending on whether the switch is off or on. The color switches instantly when turning the switch on or off, and I like this scenario. For simplicity, let’s call this configuration “on/off lighting.”

Problem scenario:
I would like to use the dimmer LED to show status on my home alarm and turn red and bright when the alarm is armed regardless of whether the light is on or off. I can do this by setting the brightness using “zwave_js.set_config_parameter” with no issue. However, once I set the z-wave brightness value manually, the “on/off lighting” functionality stops working and the LED seems to get stuck on a fixed brightness level, typically dim. I am guessing that this is caused by my automation changing the brightness which disables “on/off lighting.”

The above brings me to my question. Is it possible to manipulate the LED brightness in HA while maintaining “on/off lighting”? My ideal scenario would be that I manually set the brightness when the alarm is on and disable “on/off lighting”, and then I re-enable “on/off lighting” once the alarm is disarmed. (In this ideal scenario, I am not sure how the switch would know what brightness to choose when the alarm is disarmed because the outside light could be on or off.)

TIA for any ideas

You use notifications. This will calculate the number value you need to send.


Go to the developer tools and build the notification.

Once you get it working, click the Go to YAML Mode button to get the code.

Thank you. I understand this and am completely familiar with setting the LED color and brightness using z-wave settings.

What confuses me, is what exactly is triggering the LED brightness change when the light is turned on/off. Is HA doing this or is the switch doing this? If the latter, is there a flag somewhere to enable/disable this capability? I ask because I am trying to understand how to re-enable this on/off auto brightness feature if I have previously set the brightness to a fixed setting. (e.g. I set the LED to bright red because the alarm was armed, but now it is disarmed and so I want the light to return to the normal dim blue light is off and bright blue when light is on state.)

There are 3 parameters that set the LED bar color and brightness. Color and on and off brightness. So, just do the opposite of what you did to make it bright.

I have tried this, but it does not always work as expected. Sometimes it gets stuck on the “opposite” setting and no longer does the on/off thing and stays fixed at one level. It was stuck at dim in the past and the resolution was to turn the light on and then manually drag the dimmer slider to match.

The other possible challenge is that “opposite” is not always clear. For example, the light could be off when the alarm is armed which would suggest that the I should switch the LED to dim after the alarm is disarmed. However, someone could have turned the light on in the interim which means the correct value to set the switch too would be bright. (or vice versa…)

I don’t understand. You say the switch is configured to only be either on or off. Your descriptions don’t match with parameters and it’s operation. So, why don’t you post what you actually do.

Okay, I tried to do this and clearly was not clear and so let me try again:

  1. The switch is configured as on/off. In normal operation, the LED is blue and goes bright when the light is on and dim when off.
  2. I want to write an HA automation which changes the LED color and brightness to set it to bright and high – I know how to do this. This automation is triggered when my home alarm is armed and once the alarm is disarmed, I want the LED to return to behaving as in number 1.

In practice, I have seen that the LED changes to blue but gets “stuck” at a fixed brightness level (typically dim) when the alarm is disarmed. My question is how to do I ensure that the LED returns to state 1 after my alarm is disarmed.

You mention that I should just set the LED back to the appropriate state when the alarm is disarmed. However, I cannot be sure what the appropriate state is because the light could be on or off when the alarm is disarmed and this is independent of what the light’s state when the alarm was armed.

Let me throw this out there from a procedural standpoint. I don’t use HA, so maybe I’m missing something. If I’m off base, disregard.

Natively, the switch has the ability to store the LED color and illumination level for when the switch is off and when it is on. I understand that are successfully setting these parameters.

It sounds to me like you are trying to script the LED to change the NATIVE color and illumination level when the alarm is turned on and this is where you are running into difficulty.

SEPARATELY, the switch also supports notifications. A notification stores a separate set of parameters for color, illumination level and pattern.

So you can set the color, etc for on/off separately for the notification. For example, you can have the on/off set to blue and the notification to flashing red.

So once this is configured, you just need to turn on the notification when the alarm is on and turn it off when it’s disarmed. No need to be sending LED color/illumination level changes.

I think you are approaching this by changing what I term the native color/illumination level for your notification, when a separate notification capability exists.

Not sure how this fits into the HA environment, but just thought I’d throw it out there.

1 Like

Post the code snippet for the switch setting you used when you armed and disarmed. What you’re describing should be easy but what you’re describing happening isn’t make much sense.

I somehow missed the ability to use notifications which seems to be exactly what I need. I just added the following as an action in my alarm automation which should do what I want. However, nothing happens when I trigger the action and so I am probably doing something wrong:

Update: If it matters, my switch is running firmware 1.57

service: zwave_js.set_config_parameter
  device_id: <devId>
  parameter: '16'
  value: '83823104'

It seems that I would then need to add the following to my disarm automation to disable the notification:

service: zwave_js.set_config_parameter
  device_id: <devId>
  parameter: '16'
  value: '16714240'


Yes, I think that you are right and this clarification is super helpful. Thank you! I just posted a follow-up question focusing on notifications.

1 Like

That is a notification. Your service is wrong. Try zwave_js.bulk_set_partial_config_parameters.

Again, use the developer tools, services tab to test it out and get the correct YAML code.

I used that to test it.

service: zwave_js.bulk_set_partial_config_parameters
    - 28b06afd7b07158a83f8b739d4e243e2
  parameter: '16'
  value: 16714240

It’s easier to use entity because that’s a name you assign, but I already had the device picked so I left it.

Your values are flashing red for the first one and the second one did stop it.


This works perfectly. Thank you!

1 Like

I’m still curious what you were doing before. Were you changing parameters 13-15?

If you were, maybe the change doesn’t affect the LED until the switch was turned on or off again? I’ve noticed when I change the minimum or maximum dimming level (5-6) that it doesn’t tale effect until I change the light brightness.

Yes, you are correct. I believe that I changed 14 and set it to bright when armed and dim on disarmed. (I changed 13 too, but that had no issues.) This is because I assumed that the light would typically be off when disarming the alarm. However, I did find that the LED would get “stuck” on dim, and so the normal on/off bright/dim cycle would stop working.

I get your point about it resetting with an on/off cycle, but I did not see that it. It seemed to be stuck at dim. The fix was to turn the light on, and then manually adjust the HA LED slider to bright. It was very strange and quite annoying. I got so bothered that I disabled that automation.