ESP32-Cam - disable when I am at home

Hi,

does anybody know the way to disable camera when I am at home, and enable it back again when I am going out?

Maybe there is a way to disable entity using some automation?

The hardware I am talking here about is ESP32 with camera module.

Thanks.