Skip to content

Instantly share code, notes, and snippets.

@zachfeldman
Last active March 25, 2023 23:03
Show Gist options
  • Save zachfeldman/46d477e2a1313d40ddf6bd1c088fc1c3 to your computer and use it in GitHub Desktop.
Save zachfeldman/46d477e2a1313d40ddf6bd1c088fc1c3 to your computer and use it in GitHub Desktop.
garage_door_close_x_minutes
blueprint:
name: Garage Door Close after 10 minutes
domain: automation
input:
garage_door_target:
name: Monitored Sensor
description: Garage door itself
selector:
entity:
domain: cover
delay_before_close:
name: Delay before close
description: How long to wait before trying to close the door
default: 10
selector:
number:
min: 0.0
max: 60.0
unit_of_measurement: minutes
mode: slider
step: 1.0
mode: single
trigger:
platform: state
entity_id: !input 'garage_door_target'
from: 'closed'
to: 'open'
action:
- alias: "Wait the number of minutes that has been set"
delay:
minutes: !input delay_before_close
- service: cover.close_cover
target: !input garage_door_target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment