Editing simulated presence sensor

You should just add a simulated presence sensor, rather than a switch. It’s an existing simulated device - no DTH needed. The nice thing about the simulated presence sensor is that it does show up in the app as a presence device, and you can include it in automations.

Here’s a trivial way to link one to the real thing.