💡 Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time - Light Control - Device Tracker - Night Lights

@Blacky Hi and thanks so much for the excellent blueprint!!!
Im on 6.8 with a very basic setup and seeing some very strange night light behavior, hoping you can help

I have a single mmwave presence sensor as a single trigger.
I have 3 smart bulbs in a HA helper light group (all entities - on)
Normal automation is mmwave triggers the group including color temp+brightness, .5 delay (this all works perfectly)

Nigh light is triggered by time+entity state (same mmwave) → a single smart bulb from the group of 3 mentioned above including color temp+brightness, .5 delay

The problem is, when the night light is triggered, it works as expected until the .5 delay ends. Instead of turning off, the other 2 bulbs turn on, then there is another .5 delay, and then they all turn off.

This same setup worked in 6.3. Also I did already try deleting and recreating from scratch.

No scripts/scenes/or any other features of the blueprint are being used, very basic config.

Any assistance would be greatly appreciated!

Thanks in advance,
Sam

@ssmiller60

Hi Sam, and welcome to the community.

Thanks for reaching out. Without seeing your YAML it is a bit tricky to resolve but I give it a shot.

This part concerns me. Do you have your mmWave (your trigger) also included in your night light state? If so, please remove your mmWave sensor from the night lights and disable the night light state condition and just use the time condition. Your trigger for the automation works for both normal lights and night lights.

TIP: When grouping lights, using just one light from that group in night lights can cause a flicker problem if you are using the “If lights are ON, adjust the lights when crossing over” option in night light control. While you can use light groups, I recommend entering all three lights separately. This way, you don’t need to group them, and it will work as designed.

What happens is when it transitions from normal lights to night lights (and vice versa), the automation checks which light you are using for normal lights and which for night lights. It then knows what to do and only turns OFF the lights that are required. When you group them, it sees the group as one unit, so it will turn OFF the single light you are using for night lights because it is in the group, then turn it back ON instantly, causing the flicker.

The BP does so many things, and the idea is that you never notice.

If your still having a problem then could you please provide us your YAML of the automation? This YAML code are the settings you have selected in the automation so I can help. To do this go into your automation, top right 3 dots, Edit in YAML, copy all the code, come back to the forum and in your reply at the top tool bar click on “</>” and paste code in there.

Let us know how you go.

Blacky :smiley:

Hi @Blacky ,

first of all thanks again for your blueprints, they are amazing and I am using three of them for a couple of month now. Amongst others, I use the Sensor Lights blueprint in my bedroom, i.e. controlling my bedroom‘s ceiling light with a Hue motion sensor, while the ambient lux option enabled. Works as it should, so far so awesome! Even my wife does not want to miss the home automation anymore :smiley:

Now, I wanted to take the automation to the next level and also turn on the ceiling light, when I open any of my three wardrobe doors. I installed contact sensors on each of them and created three separate Sensor Light automations for each wardrobe door which turn the ceiling light on when the respective door is opened and off when it gets closed.

Unfortunately, when two doors are open at the same time and I close one of them, the ceiling light turns off. That is of course not what I intended and can be really annoying. As you can imagine, I want to keep the light on as long as any of the three doors is open.

TO achieve this, I thought I could add all three contact sensors to my regular Sensor Light automation (the one that only was setup to work with the motion sensor) and also setup a toggle helper “wardrobe open” and add it as an entity to the Sensor Light automation so that the helper gets toggled on whenever I open any of the three doors but the blueprint does not let me add helper entities to be turned on under “Lights - Swtiches - Scenes - Scripts”.

Do you (or any other member) have any hint on how I could set up the automation to achieve my goal of a turned on ceiling light as long as any of the doors are open?

Thanks and helpis so much appreciated!

@arne.conrad

Your welcome glad you both like it.

What you need to do is create a group helper with all your door sensors and use that as the trigger. If any door is open it will be ON and all have to be closed for it to go OFF. Click Here on how to create a group helper.

I do have a question
 is the ceiling light the same light you use in your regular sensor light?

Also have you had a look at this blueprint? :door: Closet, Pantry, and Cupboard Lighting

Blacky :smiley:

@Blacky thanks so much for the warm welcome and the extremely quick response!!!

Yes, you are correct, I did have the mmwave trigger in both the parent automation and the night light subsection. I have removed mmwave from night light leaving only the time trigger. I apologize for bugging you with a silly mistake! I work in IT for many years and did try to be self sufficient :slight_smile: I did make an effort to read both your how to docs and FAQ but apologies it was not clear to me that night light inherited any triggers in it’s parent.

Also, thanks for the tip about grouping! I’m currently using a separate automation to sync the state of some wall switches to the state of the lights and that requires my grouping to creatively get it all to work. I do have plans to start playing around with your bypass functions tied to those switches instead, but I was working on night light stuff first.

Thanks again for the help!! :smiley:
Sam

Thanks for the quick answer :slight_smile:

I have not seen the fairly “new” blueprint :door: Closet, Pantry, and Cupboard Lighting but wow, it is almost what I need! Just tried it and it works like a charm, so that could work in general.

However, to answer your question: the ceiling light is the same that turns on via the regular Sensor Light automation as soon as the motion sensor is triggered. I am using the ambient lux option and also set a toggle helper “bedtime” as Bypass Switch - Turn lights OFF so the lights will not turn on while I am asleep.

Now, I would love to have my ceiling light in the bedroom behave in the following way including the wardrobe doors:

  • light does turn on when motion is detected and the ambient lux is below the threshold and the other way around (works via Sensor Light)
  • light does not turn on, when I am asleep, i.e. bedtime helper is active (works via Sensor Light)
  • light does turn on when I open any of the three wardrobe doors but ambient lux is above threshold and “bedtime” helper is off
  • light does not turn off when it has been turned on by motion an I close any of the wardrobe doors
  • light does turn on to 20% brightness when bedtime helper is active

Now that I am writing this, I guess I would only need a night option in your :door: Closet, Pantry, and Cupboard Lighting blueprint and use the bedtime helper as the trigger to activate the automation’s night mode?

BTW: Using a group helper and adding it as the trigger to the regular Sensor Light automation did not work during the day. I guess because of the ambient lux threshold
?

Thanks!!

@ssmiller60

Thanks for letting us know. Glad you are up and running and I am more then happy to help.

Your welcome.

Enjoy

Blacky

@arne.conrad

This can get really tricky when you are using the same light but would like so many scenarios.

I have this on my list to do. Maybe I should do that next.

Sorry I should of said to use it in your 2nd automation but because it is the same light you will get conflicts.

Blacky :smiley:

1 Like

I have this on my list to do. Maybe I should do that next.

Would love to have that! :slight_smile: It will not cover the scenario that I wished for completely but for now it will be close enough.

Maybe I can find a way to solve this with additional helpers and the options to prevent turning the light off that are currently available in the Sensor Light blueprint. I have some other ways in my head that I will try and in case I find a solution that works for the complete scenario, I will post it here.

1 Like

@Blacky collapse sections in Blueprints in the lastest HA version - nice! :slight_smile:

They are listening!

@pgale

Yes they are. I have the next release done, tested and ready to go. I am just cleaning up some code now (can’t help myself) but it looks really good.

I am just letting everyone update to the latest HA before it’s release, or should I just send it?

Blacky :smiley:

What happens if you don’t have the latest version that supports collapsible sections? Does it just look like the old version or does it error?

If you don’t have the latest version of HA then all your automation will stop working.

It really is just the look and ease of using it and no additional features that’s why I pushed out dynamic lighting fix before this release of HA.

I think I will be responsible and wait for the next release of HA before I release the next version
 it is only a month away.

Thanks for your patience.

Blacky :smiley:

Yes I think if you released it now and users updated without reading any warnings, it would be a support nightmare! :wink:

1 Like

I really loved this blueprint and was the only complete one. thanks a lot@Blacky.
i played a lot with it the last 24 hours and i already see two points :slight_smile:

  • once transition off phase kicks on after time delay finish, if trigger the sensor again, the light won’t go on. instead it will transition to off, and since trigger is already ON, the light remains off until i clear the trigger to OFF and ON again. any solution for this ? transition is good to help identify that light will go off shortly unless we have option 2 (see second list item)
    please note that i have tested the state during dimming by setting the transition time to 30 seconds. So, in HA dashboard, the light does not show as OFF during transition phase. Instead, it shows with light brightness decreasing slowly until reaching OFF at end of transition phase

    also, FYI I am using philips hue light configured on hue bridge (and not HA or Z2MQTT) + everything presence motion sensor

  • is there a way we can have option to make brightness goes to 50% xx secondes before going off (exactly like how philips hue is handling this natively on their basic app). i didnt find that option on configuration unless im missing something.
    again thanks a lot for this great work!

@youyou24

Welcome to the community.

Can you try using a scene for your lights and then enter in a ‘Scenes & Scripts - Toggle Helper’ then use a script in ‘Scenes - Scripts To Turn OFF’ and in the script have your lights go to 50% then wait X amount of time you like and then turn it OFF. I think you will get everything you are after.

It may only work with a scene in ‘Scenes - Scripts To Turn OFF’ and then use the transition in light control

Blacky :smiley:

1 Like

Soon
? :slightly_smiling_face:

@iona

Yep that is where it all started. It is all done and ready to go just waiting for everyone to update their HA so we don’t break their automatons. It will probably be out next month. I am updating a lot of my blueprints.

Thanks for your patience.

Blacky :smiley:

2 Likes

Thank you very much, glad to be here :wink:

Thanks for the good suggestion by the way! Sorry if my explanation was not specific enough, I will try to re-phrase it :smiley:

Let’s say I have 5 automations for 5 different rooms. They all have the setting “Enable the time options” set to “ON”. And “Start Time” is set to 20:00:00 and “End Time” is set to 5:00:00 for example.
Would it be a good idea to (instead of putting in the 20:00:00 as integer values into the time field for all 5 automations one by one) rather be also able to use an input_datetime.lights-on-time helper as an alternative to the 20:00:00 field?

With that it would only require one change of the set time within the input_datetime.lights-on-time helper to adjust the “Automation controls lights” and “Automation ignores motion sensors” time values at once.

In theory that could maybe look somewhat like this, I have created a small mockup that hopefully explains it better: :smiley:

Greetings,
Andy :slight_smile:

Hi Blacky,
for those who have already updated their system, is there a way to get the latest version of the Blueprint?

Thanks for your amazing blueprints
Michael_uses_HA