Have you considered AppDaemon for automations? https://appdaemon.readthedocs.io
I tried to use the YAML based solutions but YAML is not done for that and anything more complicated is not doable (or at least without a super-complex code) - this is usually a few line sin Python in AD.
I would love to be able to use the presence automations but my wife ad children, for reasons that are beyond my understanding, sometimes switch off the wifi to use their data plan. The GPS tracking was draining the battery too much last time I tried (but I have to try again).