Take a look here:
Virtual presence devices with switches that the home app turns on and off is the short answer.