Help with nested automation

HI,

i am trying to send notification based on device tracker, currently i do it based on status home for 10 minutes, but i want to add logic to see home after being Not_home for > 30 minutes.

- alias: Send notification on arriving home
  trigger:
    platform: state
    from: not_home
    for:
      minutes: 10
    to: home
    entity_id: device_tracker.my_s8
  action:
    service: notify.smtp
    data:
      title: “Arrived home”
      message: “Arrived home!”


also can i do a nested action, along with email i want to call a sonos_tts welcome message.

Thanks,

  action:
    - service: notify.smtp
      data:
        title: “Arrived home”
        message: “Arrived home!”
   - service:  ***********

Not sure how to implement the first part of your question. But for multiple services just make a list. Lists are descibed in the bottom of the YAML doc section.

thanks, i’ll give it a try after i get the TTS working

The easiest way to handle the first question would be with an input boolean and an automation that would turn it on after 30 minutes of being not home, and then a condition in your arriving home automation to check that the input boolean is turned on.

ok, so no easy way of saying not_home > 30 minutes? for the bluetooth itself?

Nope. I went through this exact issue with an automation for my garage a few months ago.

i just saw conditions… had you looked into it?