Measuring time away from home

Hi,
I’ve set up an automation so when one of the family members arrives home after dark the outside lights switch on. The trigger is their phone attaching to wifi. I have a problem that the phones can be off the network for a couple of minutes which then inadvertently triggers the lights.

Is there a way I can minimize false triggers, ie. Only somebody is away is greater than 15 minutes.

Set the consider_home to your device tracker

Or build a script that checks if people are away, then sets a counter for 15 minutes, then checks again and if people are still away fires the automation.

You should just add a ‘for’ to the trigger section of your automation, so that it only triggers if someone is away ‘for’ so many minutes.

    # If given, will trigger when condition has been for X time.
    for:
      hours: 1
      minutes: 10
      seconds: 5
1 Like