If the Cam and lights are both Wyze products, then I’d expect to be able to do this with Automations within the Wyze app. If you’ve got a mix of other things (IoT devices from other manufacturers), then I wonder if IFTTT or Google Home would be options. Without knowing more about what you’re using and trying to accomplish, I don’t know what else to suggest at this point.
I also imagine that Home Assistant might be an option. I’m curious about that but haven’t touched it yet.