A sort of "binding" between devices

You can perhaps get inspiration from this:

Expand the clusters on the switch and look for on/off.
Drag it as source in the bind box.
Look for same cluster for bulb and drag it as Destination.
Will work even if Deconz is offline.