The easy way would be to create an activity in the harmony app/remote then just leverage IFTT sense you’re presence device and then run the harmony activity.
Use the existing “when i leave” function to run a routine. You could use virtual switch here and tie that to harmony more on that here: