Little confused on how to calculate notification values for VZW31-SN

After some playing around and researching the switch, I do know that Parameter 99 is the new Parameter 16, which is great. I’m trying to calculate notification values automatically based upon selected color values, time, effect and brightness, similarly to Inovelli Switch Toolbox, but I just cannot figure out what all has changed from the old LZW31-SN switches to these (besides the hardware and cool new features).

I know the old formula was color + (level * 256) + (duration * 65536) + (effect * 16777216), and I’ve come across THIS POST which states this is still the formula, but you need to swap color and duration. Not sure I understand that part as (duration * 65536) + (level * 256) + color + (effect * 16777216) should provide the same answer. But then again, math was never my strong point, so I could easily be wrong there!

I was hoping someone could help point me in the right direction, because I’ve been calculating the value using both of the above formulas, but everything I’ve come up with so far has been wrong. One example is below:

I want to calculate a Violet (190) light effect at 10% brightness for 10 seconds using a Chase effect. In theory that should be (10 * 65536) + (10 * 256) + (190) + (5 * 16777216), which is 84544190. This is at least 50% wrong, but it does appear to get both the brightness part correct and effect. But the color is orange and the duration is…long, not positive how long.

I’ve checked my math against the toolkit, which provides a configuration value of 96340490. This value is correct and does exactly what it’s supposed to do, and is significantly higher than my value using the function I thought was still in place… Stranger yet, is when I take my value of 84544190 to try and decipher it using the toolkit, it automatically updates the configuration value to be 96340490 (the correct value) from 84544190 which is wrong. It does this consistently, no matter what parameters were plugged into the toolkit at the time.

I know I’m obviously doing something wrong but I just cannot figure out what at this point. I’m hoping someone can point me in the right direction as I feel like I’m still pretty close to getting this working. Tried digging through the source code in the toolbox but all that did was have me going cross eyed haha.

Swap the color and duration multipliers, like this:

old = color + (level * 256) + (duration * 65536) + (effect * 16777216)
new = duration + (level * 256) + (color * 65536) + (effect * 16777216)


And now I completely understand the other suggestion in the other thread, wow! Thanks for the clarification Mamber, that was all it was! Saved me many hours of struggling

Are you using Home Assistant? The parameters are exposed as entities directly there, you just have to go to the device and enable them. Then you don’t have to calculate the number.


That’s actually completely fair, I did forget that was an option. I have this massive subflow I’ve been using with the old dimmers and fan/light switch that calculated the notification value in the past so I’m just starting by baking in support for it there. The formula above was the last piece I was missing, so I finally got that up and running today thankfully.

Far from the most efficient way to do things, but as an interim solution it works for my use case.

It’s fairly new thing. I’ve just be playing in node red testing setting the 4 parameters instead of sending a single value myself.

Are you using the mqtt node or a different one. If the mqtt node, can you share how you are sending the effects?

I’m using the home assistant integration, not MQTT.