Keep Me Cozy II Help

I am curious if there is an easy way to modify the code to run this based on a presence sensor instead of a mode change?

Is there a coder out there that would be willing to help me with that?

Search for Rule Machine. This will enable you to create rules that will not require additional coding for things like this for you