Skip to content

Instantly share code, notes, and snippets.

@DarkCoder28
Last active February 7, 2024 23:59
Show Gist options
  • Save DarkCoder28/def7db90661a7348454d7872ad82e816 to your computer and use it in GitHub Desktop.
Save DarkCoder28/def7db90661a7348454d7872ad82e816 to your computer and use it in GitHub Desktop.
blueprint:
name: Door Sensor w/ Retrigger Timeout
description:
"Turns on the entity specified below; dosn't retrigger within the set timespan\n\n Blueprint\
\ Version: 3"
domain: automation
input:
sensor:
name: Door Sensor
description: Pick a Binary Sensor
selector:
entity:
domain: binary_sensor
light:
name: The light entity to control.
description: The light entity (Can be a light group) to control.
selector:
entity:
domain:
- light
- switch
timeout:
name: Timeout
description: The delay time before retriggering the lights to turn on
default: 5
selector:
number:
min: 0
max: 30
step: 0.5
unit_of_measurement: minutes
source_url: https://gist.github.com/DarkCoder28/def7db90661a7348454d7872ad82e816
mode: single
max_exceeded: silent
trigger:
- platform: state
entity_id: !input sensor
from: "off"
to: "on"
action:
- alias: "Light On"
continue_on_error: true
service: homeassistant.turn_on
data: {}
target:
entity_id: !input "light"
- delay:
minutes: !input "timeout"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment