Interesting feature for lights, but one question regarding your particular scene, Why are you using so many lights?
It is possible to accomplish what you have done using GI Emissive Plane_Round prop supplied with iClone.
In the scene below I have 4 items on stands and each one has an Emissive Plane placed above it and set as a Dummy, the scene lights are switched off:

Global Illumination is also off:

With GI active, lights still off, all of the props are illuminated:

Using the GI settings in the prop modify panel it is also possible to control each individual "light source" above the display items:

The nice thing about this setup is, IMHO, the ability to turn all the display lights on or off with one mouse click in the visuals tab, but still offering control over each and every display "Light" if required.
Please don't get me wrong, I'm not knocking your script as I can imagine that there are indeed scenes requiring a selection of different light sources that could be controlled simultaneously, and if you can figure out how to get keyframes set for them all at once it would be a real winner.
:):cool::smooooth:
Gerry
System: Win 10 Pro (21H2), Asus X99-E WS, CPU i7-5930K -3,5 GHz, 32 GB DDR4 2666-16 RAM, NVidia GTX 1080 Ti GPU - 11 GB VRAM(Driver Studio-536.99), Samsung 850 Pro 512 GB SSD, 6 TB HD storage.