Bug in herdsman converter for IndividualLEDEffect

@Eric_Inovelli I don’t see any documentation for the Individual LED Effect parameter (I looked here: Blue Series 2-1 Switch • Parameters | Inovelli Help Center), but what I’m seeing is the following. When I’m using the Exposes screen of z2m to change the Individual LED effect for LEDs1-7 and I’ve taken the paddle off the switch to confirm which exact LEDs are affected. When I set the LED1 effect to something like solid on I actually see the second from the bottom LED change. When I set an effect for LED6 the top LED changes, and setting it for LED7 has no change at all. What I think is going on is that this function in the firmware numbers the LEDs 0-6 (which would make sense to a programmer) instead of 1-7.

I’ve been looking through the zigbee-herdsman-converters inovelli.ts file and suspect the issue is on line 1406 but while I’m a programmer I’m not typescript experienced or familiar with this code base so I could use some help confirming this and getting it fixed.

I created an issue here: Inovelli Converter inovelli_individual_led_effect is offset by 1 LED · Issue #27319 · Koenkk/zigbee2mqtt · GitHub

After reading through the code (I am very rusty in Javascript) I understand what the issue is and what needs to be done and it should be fairly easy, but I don’t know exactly what the final syntax needs to be. I explained it in the comment on the linked issue above. The general idea is that the current code parses the displayed value for the LED to set the effect on which is 1 - 7. But fails to look up the actual led index value using the “Individual LED to target.” array which would map the values to a correct 0 - 6 value required by the API.

Because my zigbee2mqtt is deployed via a docker container in Home Assistant using the core module I don’t know how to actually test a fix, but I think I’ve provided all the necessary clues to make it easy for someone to take the rest of the way.

@EricM_Inovelli I created a pull request Convert Inovelli UI LED1-7 to API 0-6 for individualLedEffect by sprior · Pull Request #9288 · Koenkk/zigbee-herdsman-converters · GitHub which fixes this issue. It affects ALL Blue switches which support Individual LED Effect. The pull request is current in the requires external review state - can someone approve?

Thanks for digging into it. I just gave my nod of approval on the git issue. Usually it only takes a day or two to make it into dev.

1 Like