I had ChatGPT made this:
blueprint:
name: Motion - Temporary Brightness Increase With Restore
description: >
Temporarily increases a light's brightness when motion is detected.
Only runs if the light is already ON.
After the configured no-motion timeout, the original state
(brightness, color, color temperature, etc.) is restored.
domain: automation
input:
motion_sensor:
name: Motion Sensor
description: Binary motion sensor that triggers the automation
selector:
entity:
domain: binary_sensor
device_class: motion
target_light:
name: Target Light
description: The light to temporarily brighten
selector:
entity:
domain: light
brightness_pct:
name: Temporary Brightness (%)
description: Brightness level to set during motion
default: 80
selector:
number:
min: 1
max: 100
unit_of_measurement: "%"
no_motion_wait:
name: No Motion Timeout (seconds)
description: Time without motion before restoring original state
default: 120
selector:
number:
min: 5
max: 3600
unit_of_measurement: seconds
mode: restart
max_exceeded: silent
variables:
scene_id: "motion_restore_{{ this.context.id }}"
trigger:
- platform: state
entity_id: !input motion_sensor
to: "on"
condition:
- condition: state
entity_id: !input target_light
state: "on"
action:
# Snapshot current light state
- service: scene.create
data:
scene_id: "{{ scene_id }}"
snapshot_entities:
- !input target_light
# Set temporary brightness
- service: light.turn_on
target:
entity_id: !input target_light
data:
brightness_pct: !input brightness_pct
# Wait until motion turns off
- wait_for_trigger:
- platform: state
entity_id: !input motion_sensor
to: "off"
timeout:
seconds: !input no_motion_wait
continue_on_timeout: false
# Ensure full no-motion duration
- delay:
seconds: !input no_motion_wait
# Restore original state
- service: scene.turn_on
target:
entity_id: "scene.{{ scene_id }}"