Kids coat on coat rack message automation question

Hi,
I want to remember my daughter to hang up her coat on the coat rack when she arrives at home.
I made an automation which initiates a phonecall and tell her to hang up her coat. It is triggered when she arrives at home. But… it’s not accurate enough. Sometimes the automation is triggered when she drives bye, and sometimes, her state changes while she is still at home and receives this message randomly
I am thinking about 2 automations:

  1. Triggered when the front door closes AND she is at home for less than 3 minutes
  2. Triggered when she is arrives at home AND the frontdoor is closed for less than 3 minutes.

I don’t know how to implement less than 3 minutes in the condition.

Can someone give me a clue?


- id: '16303161811367420'
  alias: jas ophangen
  description: herinner lonneke eraan haar jas op te hangen
  trigger:
  - platform: state
    entity_id: person.lonneke
    to: 'home'
    for: '00:01:00'
  condition: []    
  action:
  - service: hassio.addon_stdin
    data_template:
      addon: 89275b70_dss_voip
      input:
        call_sip_uri: sip:06405******@192.168.178.42
        message_tts: > 
            Heb je je jas opgehangen? Op de kapstok? Mooi!
  mode: single