Automation snooze action binary sensor

Hi,
I got 2 automations that are checking the status of my garage door’s sensor (binary sensor).

  1. will triggers after 10 min a notification to your mobile, that the door are open, with action close.
  2. will trigger after 20 min if the status is still open and automatically close the door + notification with action open door.

I’d like to add a Snooze action to the 1st one, so you can add additional 10 min.
I was thinking to change the status of the binary sensor (1 sec trigger on/off), but this is not possible via automation, or? Any help here?

2 Likes

You could use an input_number for that.
When you execute the snooze action add 10 minutes to the input_number.

Then use the input_number in the trigger of your second automation in the “for”-part.

got an example to this? never used it before

Have you done this? can you care to share

sure:
I’ve made 2 timers in configuration.yaml:

timer:
  garage:
    duration: '00:10:00'
  2garage:
    duration: '00:20:00'

and then in automations:

EVENTS to snooze/reset the timers:

alias: EVENT - snooze garage
description: ''
trigger:
  - platform: event
    event_type: ios.notification_action_fired
    event_data:
      actionName: SNOOZE_GARAGE
  - platform: event
    event_data:
      action: SNOOZE_GARAGE
    event_type: mobile_app_notification_action
condition: []
action:
  - service: timer.start
    data:
      duration: '600'
    target:
      entity_id: timer.garage
  - service: timer.start
    data:
      duration: '1200'
    target:
      entity_id: timer.2garage
mode: single

and then an action for check after 10 min:

alias: Garage - 10 - check
description: ''
trigger:
  - platform: event
    event_type: timer.finished
    event_data:
      entity_id: timer.garage
    id: timer.garage
condition:
  - condition: device
    type: is_off
    device_id: <id>
    entity_id: switch.tasmota_garage_2
    domain: switch
  - type: is_on
    condition: device
    device_id: <id>
    entity_id: binary_sensor.tasmota_garage_switch2
    domain: binary_sensor
action:
  - service: notify.notify
    data:
      message: Check garage{{ now().strftime("%Y.%m.%d - %H:%M") }}
      title: Garage left open !!!
      data:
        actions:
          - action: CLOSE_GARAGE
            title: close garage
          - action: SNOOZE_GARAGE
            title: soonze for 10 min
        entity_id: camera.camera_front

same after 20 min with action trigger the garage switch

1 Like

Thank you i will try this