Yes, that is what I was attempting to ask. I want to turn on a remote light with a local signal from a PIR. The light is 30 feet or more from the PIR. I would like to eliminate the Raspberry Pi. There is a network available.
I only have this question about that: https://rntlab.com/question/using-cloudmqtt/
Instead of using a local free broker installed on a Raspberry Pi, you can use a Cloud MQTT broker like CloudMQTT as I explain in that post… You can modify the ESP32 code to connect to the Cloud broker.
I hope that helps.