You still haven’t said what you see in the traces. That’s what they are for, to help debug automations. Most, if not all, of the details you need to figure out how your automation is working, or not, should be there.
It never triggered, the traces showed nothing, i forget to post that.
So this version is what triggers and works without issue to get back to a known good:
alias: Garage - Save last door used v1.11
description: ""
triggers:
- trigger: state
entity_id:
- device_tracker.life360_person1
- device_tracker.life360_person2
from: home
to: not_home
for:
hours: 0
minutes: 0
seconds: 45
actions:
- action: input_text.set_value
target:
entity_id: "{{ helper }}"
data:
value: >
{% set doors = [
states.cover.ratgdov25i_1be829_door,
states.cover.ratgdov25i_1be83c_door
]
%} {% set last_door = (doors|sort(attribute="last_changed"))[-1] %} {{
last_door.entity_id }}
variables:
helper: >-
input_text.door_{{ trigger.entity_id.removeprefix('device_tracker.life360_')
}}
so the thought was to add “last changed” in the previous 30 minutes as the way to cover any random ghost triggers