Allow configuring the delay in the motion light blueprint (#43737)

This commit is contained in:
Paulus Schoutsen 2020-11-28 23:56:15 +01:00 committed by GitHub
parent 1162d9a752
commit e406a47293
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,8 +15,16 @@ blueprint:
target: target:
entity: entity:
domain: light domain: light
no_motion_wait:
name: Wait time
description: Time to wait until the light should be turned off.
default: 120
selector:
number:
min: 0
max: 3600
# If motion is detected within the 120s delay, # If motion is detected within the delay,
# we restart the script. # we restart the script.
mode: restart mode: restart
max_exceeded: silent max_exceeded: silent
@ -35,6 +43,6 @@ action:
entity_id: !placeholder motion_entity entity_id: !placeholder motion_entity
from: "on" from: "on"
to: "off" to: "off"
- delay: 120 - delay: !placeholder no_motion_wait
- service: homeassistant.turn_off - service: homeassistant.turn_off
target: !placeholder light_target target: !placeholder light_target