I have this condition for opening the door when we come with one of the Blutooth tags or or phones, to make sure that it doesn’t happen more than once in two minutes:
{{ now() - state_attr('automation.unlock_door_for_mastiffs_phone', 'last_triggered') > timedelta(minutes=2) }}
We use guest tags as well, and the problem arises when there is no “last triggered” in the database because the tag hansn’t been used for a few months. Is there a way to add something to that line that makes the condition true if there is no last_triggered as well?