Send notification only when door is open for at least 5 min

Hey there,

currently the message is always sent. Can somebody help what to adjust?

alias: Achtung | Haustür offen
description: ""
triggers:
  - type: opened
    device_id: 513df0cce3740e3bbd106f1c49715614
    entity_id: 56f0b203667620b7183c41660ee87356
    domain: binary_sensor
    for:
      hours: 0
      minutes: 5
      seconds: 0
    trigger: device
conditions:
  - condition: time
    after: "18:00:00"
    before: "07:00:00"
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
      - sat
      - sun
actions:
  - action: notify.family_group
    data:
      title: Alarm
      message: Haustür offen
mode: single

Do i misunderstand the for part?

change trigger to state

for the entity’s value change from closed to open

1 Like

Hi Michael,

I have a blueprint that does this. Feel free to use it or look at how I did it for tips and tricks…
Community link for this blueprint

Also this is something you may want to read as well.
Why and how to avoid device_ids in automations and scripts.

1 Like