I installed smart glass at my bedroom windows for better privacy. The glass turns clear or opaque at the flip of a caseta smart switch - ON is clear, OFF is opaque.

I'd like for the smart glass to take into a count the bedroom lights which is also on caseta system. The goal is so when the light is turned ON, the smart glass turns OFF (opaque) automatically.

In other words, pressing the ON button on a pico must turn ON a switch and turn OFF another switch if that other switch was ON. No action required if that other switch was OFF or when pressing the OFF button.

What does it take to make such setup?