Can anyone offer advice on setting up an automation using zones. I have a few issues that I am trying to overcome. First the two zones are approximately 1 hour apart in driving time. Another is that my presence at “Trigger Zone” has historically logged early departure due to spotty cellular signal. My final and hardest issue is traveling through or very close to other zones that I want to ignore.
My goal objective would have two actions. First , Send a message 10 minutes after departure from “Trigger Zone”. Second would be to send another message after detected at “Home” for 1 minute. Currently, the only successful method is to enable two separate automatons when needed, Departure, and Arrival. Would anyone have any idea how I can combine this to one automation with the delays and triggers.
Trigger on leaving the first zone for 10 minutes, send your message, then wait for the second zone trigger using this https://www.home-assistant.io/docs/scripts#wait-for-trigger
This is a long automation and could be interrupted by a restart or reload. You may be better off with two automations.
Thank you Tom. My problem is the second part, using separate automatons, the tracker arrives home from other departure and when it triggers, it causes massive confusion because it calls others to assist on arrival. I know I have seen examples of how to yaml a sequential automation… but I can not find an example anymore. Is it possible that you could post a generic example of a single automation with a trigger, followed by another trigger event? If I can determine best practice for nesting within an automation, I know I could get it from there. Thanks
I linked you directly to an example of this. Probably not a great example. Here’s another:
action:
- service: blah.blah
target:
entity_id: domain.object_id
data:
foo: bar
- wait_for_trigger: # waits here until this trigger occurs
- platform: state
entity_id: doamin.something
state: "on"
- service: blah.blah # then continues the action sequence after the trigger occurs
target:
entity_id: domain.object_id
data:
foo: bar