Automate temporary arrive home lights

HI,
Trying to get the most out of my smart outdoor lights if setup this rather basic automation:

  - alias: 'Arrive home evening lights'
    id: 'Arrive home evening lights'
#    initial_state: 'on'
    trigger:
      platform: state
      entity_id: group.family
      to: 'home'
    condition:
      - condition: template
        value_template: >
          {{ is_state ('binary_sensor.outside_daylight_sensor', 'off')}}
      - condition: template
        value_template: >
          {{ is_state('light.outdoors', 'on')}}
    action:
      - service: light.turn_on
        data:
          entity_id: light.outdoors
          brightness: 250
          transition: 5
      - delay:
          minutes: 2
      - service: light.turn_on
        data_template:
          entity_id: light.outdoors
          brightness: >
            {{states('input_number.outdoors_brightness') }}
          transition: 5
      - condition: template
        value_template: >
          {{ is_state('input_boolean.notify_system', 'on')}}
      - service: notify.notify
        data_template:
          message: >
            {{as_timestamp(now()) | timestamp_custom('%X') }}: 
            Outside lights welcomed you home and now restored to {{states('input_number.outdoors_brightness') }}.

Wondering if any of you had suggestions to make this better, or hear from your experience which bottlenecks to expect.
Idea: regular setting brightness 100 (or set by input_number for easy real time changing) is ok for night life, but not enough for finding my keys… so, coming home, this turns on the lights to max, waits 2 minutes, (should be enough to find keys) and return to normal.

thx!

There is lag in detecting user arrival. This can be issue if you depend on this to light your way into home.

This is issue experienced with WiFi and Google location trackers. Something like Bluetooth,tile or actual motion sensor would be affectively instant

thanks, yes I understand that. My groups use several trackers, so most of the time one of these (gps) trackers should send im near :wink:

Was asking because Im to sure there might be a dedicated feature i am missing. Maybe use the distance and direction attributes of proximity as an extra trigger?

something like:

condition: template
value_template: >
  {{ state_attr('sensor.waze_m_home', 'duration')|round  < 5 and 
    state_attr('proximity.m_home' , 'dir_of_travel') == 'towards'}} 

must try how to do that for a group… could also be an ‘or’ condition of course.