From ad31ace4a06f37814aeed567be7fa1b2f0c6c7d4 Mon Sep 17 00:00:00 2001 From: thomas Date: Fri, 29 Aug 2025 14:25:34 +0000 Subject: [PATCH] revert eae102cd8733b57294340bff3be4dfa5e8048b89 revert blueprints/automation/motion-light.yaml aktualisiert --- blueprints/automation/motion-light.yaml | 60 +++++++++---------------- 1 file changed, 20 insertions(+), 40 deletions(-) diff --git a/blueprints/automation/motion-light.yaml b/blueprints/automation/motion-light.yaml index 78d13c9..4f1f00f 100644 --- a/blueprints/automation/motion-light.yaml +++ b/blueprints/automation/motion-light.yaml @@ -1,8 +1,8 @@ blueprint: - name: Motion-activated Light with Lux and Daytime Dimming - description: Turn on a light when motion is detected, only if it's dark, and dim based on time of day. + name: Motion-activated Light + description: Turn on a light when motion is detected. domain: automation - author: Enhanced by Copilot + author: Home Assistant input: motion_entity: name: Motion Sensor @@ -19,21 +19,6 @@ blueprint: target: entity: domain: light - lux_entity: - name: Lux Sensor - selector: - entity: - domain: sensor - device_class: illuminance - lux_threshold: - name: Lux Threshold - description: Minimum lux level below which the light should turn on. - default: 50 - selector: - number: - min: 0 - max: 1000 - unit_of_measurement: lx no_motion_wait: name: Wait time description: Time to leave the light on after last motion is detected. @@ -44,34 +29,29 @@ blueprint: max: 3600 unit_of_measurement: seconds +# If motion is detected within the delay, +# we restart the script. mode: restart max_exceeded: silent -trigger: - - platform: state - entity_id: !input motion_entity - from: "off" - to: "on" +triggers: + trigger: state + entity_id: !input motion_entity + from: "off" + to: "on" -condition: - - condition: numeric_state - entity_id: !input lux_entity - below: !input lux_threshold - -action: - - alias: "Turn on the light with calculated brightness" - service: light.turn_on +actions: + - alias: "Turn on the light" + action: light.turn_on target: !input light_target - data: - brightness: "{{ brightness }}" - - alias: "Wait until there is no motion" + - alias: "Wait until there is no motion from device" wait_for_trigger: - - platform: state - entity_id: !input motion_entity - from: "on" - to: "off" + trigger: state + entity_id: !input motion_entity + from: "on" + to: "off" - alias: "Wait the number of seconds that has been set" delay: !input no_motion_wait - alias: "Turn off the light" - service: light.turn_off - target: !input light_target + action: light.turn_off + target: !input light_target \ No newline at end of file