diff --git a/occupancy_controlled_lights.yaml b/occupancy_controlled_lights.yaml index ab34a99..6add3f5 100644 --- a/occupancy_controlled_lights.yaml +++ b/occupancy_controlled_lights.yaml @@ -57,6 +57,16 @@ blueprint: default: true selector: 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: state @@ -92,6 +102,11 @@ action: entity_id: !input occupancy_sensor state: "off" sequence: + - delay: + seconds: !input off_delay + - condition: state + entity_id: !input occupancy_sensor + state: "off" - action: light.turn_off target: !input lights data: