Beacon / How to implement firstPersonComesHome & lastPersonLeavesHome flow?

I bought two Tile-Pro and now try to implement two flows (firstPersonComesHome & lastPersonLeavesHome) for Heimdall. Does anyone have an example that works?

THX Chris

You can use the Beacon app from the appstore if you are still on Homey 1.5