💡 Advanced Motion-Activated Light Blueprint – Now in English! V2.2

:bulb: Advanced Motion-Activated Light Blueprint

Say goodbye to basic “motion-on / timeout-off” automations – this blueprint gives you full and real control over your bathroom lighting.

:sparkles: Features:

:white_check_mark: Separate schedules for daylight and nightlight modes

:white_check_mark: Custom active hours and weekdays – perfect for weekdays vs weekends

:white_check_mark: Choice between scenes or direct light control for each mode

:white_check_mark: Optional area-based snapshot to restore all lights in a room to their exact previous state

:white_check_mark: Adjustable lux threshold – only turns on when it’s dark enough

:white_check_mark: Dynamic failsafe timer for automatic turn-off after no motion

:white_check_mark: Manual-friendly – won’t turn off lights you turned on yourself

:white_check_mark: Fully UI-configurable – no YAML editing required

:wrench: Changes Made in V2.2:

:one: Separate time windows and weekdays for each scene

:sun_with_face: Daylight Scene: active start time day, active end time day, active weekdays day

:crescent_moon: Nightlight Scene: active start time night, active end time night, active weekdays night

:two: Logic split for scene control – now respects both time and weekday for better precision

:three: Added snapshot/restore feature:

:bulb: Capture and restore a single light

:bulb::bulb: Capture and restore a custom list of lights

:house::bulb: Capture and restore all lights in a chosen area

:dart: Benefits of This Update:

:muscle: More flexibility – tailor lighting to your lifestyle

:dart: Better control – works great for night shifts, early risers, or lazy weekends

:chart_with_upwards_trend: Scalable – easy to extend (e.g., “Evening Relax Scene” or “Cleaning Mode”)

:crescent_moon: Smart night mode – switches scenes automatically outside your preferred schedule

:bulb: Adjustable lux threshold – only turns on when it’s actually dark enough

:stopwatch: Failsafe timer – set your own timeout; light turns off only if no motion is detected

:raised_hands: Manual-friendly – won’t shut off lights you turned on yourself

:hammer_and_wrench: Designed to be fully UI-configurable – no YAML tweaking needed

:package: Installation:

:one: Import the blueprint into Home Assistant via the UI

:two: Link your devices: motion sensor, main light, lux sensor, and (optionally) scenes or direct light entities

:three: (Optional) Select a snapshot area if you want to restore all lights in that room when motion ends

:four: Configure times, weekdays, and lux threshold as desired

:five: Save & enjoy smarter, more flexible bathroom lighting!

:link: Grab the blueprint here :

Support

Questions or suggestions? Please open an issue in the GitHub repo.

:pray: Let me know if you decide to use it – and feel free to share it with others!

4 Likes

nice work!

thz a lot , I do my best! hope you like it

Hi,
i am trying to utilise this but keep encountering Message malformed: extra keys not allowed @ data[‘actions’][0][‘choose’][0][‘sequence’][1][‘choose’][1][‘default’]

am i missing something?

description: Kitchen
alias: Motion-activated lighting Kitchen and failsafe
use_blueprint:
  path: razzietheman/Smarter_Lighting.yaml
  input:
    binary_sensor_motion: binary_sensor.hue_motion_sensor_1_motion
    light_entity: light.kitchen
    lux_sensor: sensor.hue_motion_sensor_1_illuminance
    lux_threshold: 120
    scene_klart_ljus: scene.kitchen_bright
    day_lights:
      - light.kitchen
    active_start_time_day: "06:00:00"
    active_end_time_day: "22:00:00"
    scene_nattlampa: scene.kitchen_dimmed
    night_lights:
      - light.kitchen
    active_start_time_night: "22:00:00"
    active_end_time_night: "22:00:00"
    active_weekdays_day:
      - mon
      - tue
      - wed
      - thu
      - fri
      - sat
      - sun
    active_weekdays_night:
      - mon
      - tue
      - wed
      - thu
      - fri
      - sat
      - sun
    input_text_last_scene: input_text.kitchen

including the YAML code as i am a newbie with this stuff

Same with me

Release Log – Motion-Activated Lighting Blueprint

v3.0 – 2025-08-14

  • Complete overhaul for dynamic Day/Night control.
  • Added support for sunrise/sunset triggers.
  • Optional lux threshold for intelligent light activation.
  • Snapshot restore of previous light states before scenes are applied.
  • Gradual fade-out when turning off lights for smoother transitions.
  • Added optional workday sensor for weekday-specific automation.
  • Parallel mode with multiple motion sensors and switches supported.
  • Enhanced failsafe timer logic to prevent lights staying on too long.
  • Full logging of scene activation in Home Assistant Logbook.
  • Added separate inputs for day/night lights and scenes.
  • Improved input handling and template conditions for more reliability.
1 Like

try the new 3.0 release

1 Like

try out the new 3.0 release and see if there is still problem!

1 Like

I will do just that. Thanks

V3.2 - ONLINE

:sparkles: Welcome to a Smarter Home

Imagine this: you wake up, and your home gently welcomes you with light.
You come home after work, and the evening unfolds with cozy, subtle illumination.
Motion-Activated Lighting 3.2 does all this – but exactly the way you like it.

It combines:

:walking_man: Motion
:sunrise: Sun Position
:bulb: Lux Awareness
:art: Scenes
:alarm_clock: Fixed Off-Times
:shield: Failsafe Protection

…and everything is optional. You choose your rhythm, your moods, your magic.

Please take a look at my readme

:star2: Motion-Activated Lighting 3.5 – Your Ultimate Light Maestro :star2:

Motion-Activated Lighting 3.5 brings you full control, full flexibility, full magic:

:walking_man: Motion – Trigger lighting with motion
:sunrise: Sun Position – Reacts to sunrise/sunset
:bulb: Lux Awareness – Only triggers when dark enough
:art: Day & Night Scenes – Create mood with scenes or individual lights
:alarm_clock: Dual Fixed Off-Times – Lights turn off at exact times
:date: Workday Schedule – Adapts to weekday/weekend
:shield: Failsafe w/ Activation Toggle – Gradual auto turn-off, can be toggled on/off

…and everything is optional. You define the rhythm, moods, and automation rules.

Grab the blueprint here :

For more info take a look att the readme here :

Hi @razzietheman,

I should be able to just populate the motion sensor and light inputs and that should be enough to run the automation. Is that correct?
I’ve got a Philips hue motion sensor (Zigbee2MQTT) and a sonoff mini (tasmota switch converted to light instance in home assistant itself). Yet it does not work. The automation fires from motion but no light is turned on.

I haven’t yet dug into troubleshooting, just wanted to get a quick feedback from you

yes that is correct , everything is what you self just need ,
I have a philips hue motion sensor and philips hue light
well I will check on your problem :slight_smile: but try to update the blueprint to V 3.7 that is the latest and I think that you should set that in switch instead of light

Step-by-Step Troubleshooting

1. Check the motion sensor

  1. Go to Developer Tools → States in Home Assistant.
  2. Find your motion sensor (binary_sensor from Zigbee2MQTT).
  3. Verify that the state changes from offon when motion is detected.
  • If it doesn’t change, the automation trigger won’t work.
  • Make sure the entity_id in the blueprint matches exactly.

2. Check the light

  1. Go to Developer Tools → Services.
  2. Select light.turn_on.
  3. Choose your lamp (Tasmota Mini) as the target.
  4. Click Call Service.
  • If the light turns on → light.turn_on works and the blueprint should be able to control it.
  • If the light does not turn on → the Tasmota “light instance” doesn’t support light.turn_on.
    • Solution: either convert it to a switch or adjust the blueprint to use switch.turn_on.

3. Check blueprint logs

  1. Go to Configuration → Automations → Logbook.
  2. Look for messages like:
  • “Day mode activated via motion/manual”
  • “Night mode activated via motion/manual”
  1. If no logs appear when motion is detected → conditions are blocking the automation.

4. Check conditions

  • Time: Make sure the current time is within day_startday_end or night_startnight_end.
  • Weekdays: If active_weekdays_day or active_weekdays_night is empty, the automation may not run.
    • Solution: select all weekdays, or verify how the blueprint handles empty lists.
  • Workday sensor: If used, it must be on for the automation to run.
  • Lux sensor: If empty, ignored. If used, current lux must be below the threshold.

CLOSED !!

for future see latest blueprint

I would like to use it but it’s not working - no lights are going on.
There are some issues with this in gitbub but the developer does not respond.
So this blueprint is now trash.