So i feel like this should be an easy fix, but i just cant rap my brain around it.
What im trying to do, is set up an automation that will unlock my door as soon as Unifi detects that im on the wifi, aka Home. But I only want it to unlock if iv been away from “home” for 10 mins or longer
Original working code
- id: '1526693475723'
alias: Lock - Unlock when i get home 8p-3a
trigger:
- entity_id: device_tracker.preston_phone
platform: state
to: home
condition:
- after: '20:00:00'
before: 03:00:00
condition: time
action:
- data:
entity_id: lock.front_door_2
service: lock.unlock
So I know there should be a from/to somwheres in there, but I cant figure out where
for:
minutes: 10
from: away
platform: state
to: home