šŸ’” Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time - Light Control - Device Tracker - Night Lights

I think the blueprint is great. Thank you very much for that.

I have a problem with it.
I have installed a group of two motion detectors in the hallway. I have an L-shaped hallway.
The light comes on when one of them detects movement. The other detector is still free then.
If I now switch off the light using voice control because I don’t need it and go into the area of the second detector, which has not yet detected any movement, the light switches back on. But I don’t want that. Because I switched it off using an Alexa command.
How can I build this? Is there any way to do this with the bypass?

Best regards

:face_with_thermometer: hey could you rename this blueprint lol, looks horrendous in my project

1 Like

Hi Blacky,
Thanks for the amazing blueprint!
I do have some issues with my setup.
It looks simple, but I can’t get it to work.
I have an outside light and a motion detector.
I want the light to turn on at dusk at 10% brightness (a kind of night glow).
When someone walks by, the brightness should increase to 90%.
After 1 minute, it should go back to 10%.
The light should turn off in the morning when it starts getting light outside.
Especialy the night glow doesn’t seem to stay on.
It turns off at 10 min
Do you have a YAML example so I can compare it with mine?

To start off I love the template and all the customization that’s possible with this.
I just notice that there seems to be an issue in my specific template or in general. (Or i just thought it would work like this)
I have a bypass that’s a door sensor that bypasses the bathroom light to turn on already.
But I have the turn off after X seconds when there is no real presence in the bathroom while the bypass is turned on. (Use The Bypass Auto OFF Option)
But now the bathroom light doesn’t turn off after that X seconds.
Is it possible you can help me look into this if this is possible?

Hi Blacky,
I love this blueprint and recently started to use the Night Glow option.
Is it somehow possible to define a start and end time for the Night Glow so it switches back to the Night Light brightness setting when reaching the End Time?
Or a toggle (time) helper to enable/disable Night Glow?

It seems to work now. Philips Hue was the bug and turned the light off

1 Like

Great job! I am one of them and I’m trying to figure out if it is capable to block turning lights off as long as a door contact is closed? Any hints, pls?

Thanks,
Goppi

@Goppi,
I think the Bypass option can be used for this,
When the Bypass state is ON, lights will not be switched off…
When OFF, the automation will control the lights as defined.
I use the Bypass option and this works great. Of course you need a door contact sensor

Hi, is it possible to have a ā€œvariableā€ time delay (= input number entity). So we can have/make a different time delay depending on other conditions in other automations. For example when you are cleaning the house or a time difference between when the men is in the bathroom and not the woman… :wink::sweat_smile:

Hi there,

first let me say thank you for the nice blueprint!

At the moment i try to figure out how it works with night light / night glow and dynamic light. I have a Hue lightstripe at my stairs and want a night light or night glow at sunset and turn it off at a specific time.

Additionally i want a dynamic light as well during the night light / night glow time. Is that possible with one automation or do i need 2 or more automation ?

Cheers,
Kyle

Would it be possible to add a delay to the ambient settings?

On a day as today the sun is peeking around the clouds every now and then, causing my dinner table light going off and on. I already tweaked the lux values but it doesn’t help enough. If I can add a delay (maybe the same as the motion timeout?) to this that would be nice.

Very interested in this project.

Hello,
first of all, I would like to thank you for this absolutely amazing blueprint. I have been using it for a very long time now, and it’s my favorite.
I do have a question that i hope you can shed some light into :slight_smile:

I’m running the latest version of this blueprint, and for a very long time now i have an issue that lights turn off even if the group sensor is still turned on.

I have been running aqara fp2 and another motion sensor together in a group, as per advice, however if there is a prolonged activity within the area of motion, the lights nevertheless go off, even if the sensor group is still not cleared.

I have tried going with a bigger Time Delay of 10 minutes, however that also doesn’t help.

I’m running a relatively simple setup of this blueprint with Light Control and Night lights. All other options are not used, and it works pretty well, unless there is a longer activity in the area.

1 Like

I asked about the same thing here and it wasn’t planned though Blacky did give a workaround for it (though I’m yet to implement it). :slight_smile:

Something along the lines of that might be possible.

I would like to have the option of more than one ā€˜State Control’ entity. As an work-around, I have tried and failed to create a Group helper of more than one input-boolean entity instead. I think it should be possible but the UI doesn’t seem to allow it (the drop-down list when selecting create group does not include input-booleans).

The blueprint does not seem to turn off the light automatically, if the light was turned on not by the trigger, but for example remotely using the dashboard.

Hello,

Isit possible to migrate this manual automation in your blueprint?

alias: "šŸ’”Licht: Badezimmer Automation"
description: ""
triggers:
  - id: motion_on
    entity_id: binary_sensor.bewegungsmelder_badezimmer_occupancy
    to: "on"
    trigger: state
  - id: motion_off
    entity_id:
      - binary_sensor.bewegungsmelder_badezimmer_occupancy
    to: "off"
    for:
      hours: 0
      minutes: 2
      seconds: 0
    trigger: state
conditions: []
actions:
  - choose:
      - conditions:
          - condition: and
            conditions:
              - condition: trigger
                id:
                  - motion_on
              - condition: time
                after: "04:30:00"
                before: "23:00:00"
              - type: is_illuminance
                condition: device
                device_id: f4dbab8517505bbd1467dfd615a202f1
                entity_id: 1922fb82e37497e57c0d6c4bd990c3fc
                domain: sensor
                below: 40
              - condition: not
                conditions:
                  - condition: device
                    device_id: a26bb3f57eb68e6321647d8753d5085c
                    domain: vacuum
                    entity_id: 59a3e6be8b6e4d1782cda16334261be2
                    type: is_cleaning
        sequence:
          - target:
              entity_id: light.badspiegel
            action: light.turn_on
            data: {}
      - conditions:
          - condition: trigger
            id:
              - motion_off
        sequence:
          - condition: state
            entity_id: light.badspiegel
            state: "on"
          - choose:
              - conditions:
                  - condition: template
                    value_template: >
                      {% set door_last =
                      as_timestamp(states.binary_sensor.tursensor_badezimmertur_contact.last_changed)
                      %} {% set motion_last =
                      as_timestamp(states.binary_sensor.bewegungsmelder_badezimmer_occupancy.last_changed)
                      %} {{ door_last > motion_last }}
                sequence:
                  - delay: "00:00:08"
                  - target:
                      entity_id: light.badspiegel
                    action: light.turn_off
                    data: {}
              - conditions:
                  - condition: template
                    value_template: >
                      {% set door_last =
                      as_timestamp(states.binary_sensor.tursensor_badezimmertur_contact.last_changed)
                      %} {% set motion_last =
                      as_timestamp(states.binary_sensor.bewegungsmelder_badezimmer_occupancy.last_changed)
                      %} {{ door_last <= motion_last }}
                sequence:
                  - choose:
                      - conditions:
                          - condition: state
                            entity_id: binary_sensor.tursensor_badezimmertur_contact
                            state: "on"
                        sequence:
                          - target:
                              entity_id: light.badspiegel
                            action: light.turn_off
                      - conditions:
                          - condition: and
                            conditions:
                              - condition: not
                                conditions:
                                  - condition: state
                                    entity_id: >-
                                      binary_sensor.tursensor_badezimmertur_contact
                                    state: "on"
                        sequence:
                          - wait_for_trigger:
                              - entity_id: binary_sensor.tursensor_badezimmertur_contact
                                to: "on"
                                trigger: state
                            timeout:
                              hours: 0
                              minutes: 10
                              seconds: 0
                              milliseconds: 0
                          - target:
                              entity_id: light.badspiegel
                            action: light.turn_off
mode: restart

@Blacky, I’m getting errors after updating HA to 2025.11, something with templates?
After reversing back to 2025.10.4 the errors where gone (but now I have issues with my database and really need to update to 2025.11)

1 Like

@Sn0rrii

Welcome to the community.

Yes… just add a toggle helper and use a voice command to turn that ON. You then can use the auto off bypass feature to turn it OFF in X amount of time for you.

Blacky :grinning: