Hi-
I have a python script that runs and reconciles wall switches with LampLinc device states. E.g., if the lamp is on 100% but the wall switch is off, the script updates the wall switch to be on @ 100%. That can happen if I trigger a light change in Indigo, or via HomeKit/homebridge.
The main point of scripting it is that I update more than one switch - I have several KPLs that reflect the status of the lamps in my living room. So changing one lamp might update 4 or 5 KPLs.
The script works great, but I noticed that the script finishes very quickly, while Indigo is continuing to send the devices their updates after my script completes. My script thinks it is done, but Indigo is still making things happen, sometimes for 4-5 seconds afterwards.
Is there a way to have the python script wait for all the device updates to be completed?
Specifically, I want to make sure all the device updates are sent before allowing the script to start running again.