Add configurable off delay to occupancy controlled lights
Adds off_delay input parameter allowing users to configure how long to wait after motion stops before turning lights off. Includes re-verification to prevent lights turning off if motion resumes during the delay period. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -57,6 +57,16 @@ blueprint:
|
|||||||
default: true
|
default: true
|
||||||
selector:
|
selector:
|
||||||
boolean:
|
boolean:
|
||||||
|
off_delay:
|
||||||
|
name: Off Delay
|
||||||
|
description: Time to wait after no motion before turning lights off
|
||||||
|
default: 0
|
||||||
|
selector:
|
||||||
|
number:
|
||||||
|
min: 0
|
||||||
|
max: 3600
|
||||||
|
step: 1
|
||||||
|
unit_of_measurement: seconds
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
- trigger: state
|
- trigger: state
|
||||||
@@ -92,6 +102,11 @@ action:
|
|||||||
entity_id: !input occupancy_sensor
|
entity_id: !input occupancy_sensor
|
||||||
state: "off"
|
state: "off"
|
||||||
sequence:
|
sequence:
|
||||||
|
- delay:
|
||||||
|
seconds: !input off_delay
|
||||||
|
- condition: state
|
||||||
|
entity_id: !input occupancy_sensor
|
||||||
|
state: "off"
|
||||||
- action: light.turn_off
|
- action: light.turn_off
|
||||||
target: !input lights
|
target: !input lights
|
||||||
data:
|
data:
|
||||||
|
|||||||
Reference in New Issue
Block a user