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

Hi,

I have my HA up and running with your Blueprint and it’s great, saved me loads of time and effort. I’m trying to work out how to deal with the power on situation. I have a group of 2 hue bulbs and 1 Philips motion sensor. The trigger is the motion sensor and it then turns my group on containing the two bulbs. How can I configure what happens when the lights have been switched off at the power switch and then when I turn them back on. I’d like to be able to configure the light temp and how long it’s on for after the initial physical power switch has been turn on.

Hope someone can help and keep up the great work and community support.

Edit:

I created a helper that is set to On when the one of the lights in my group powers on. I’ve added this to the Trigger Sensor Bypass and now the lights turn off after a set period of time. My next challenge was the lights would not turn back on. This was down to me only setting the automation to trigger on power on and it left the helper in an always on state. Changing the automation to fire on power on or power off seems to have solved the issue.

Please let me know if I’ve gone about this all wrong and there is a better/more eloquent way of achieving my goal.

Edit 2:
Thought I’d solved it there. It all works the first time. The light never comes back on after the first time. Even though the helper is set to off state. If I set ByPass to disable it starts to work again. Any suggestions?

@Gooshy

Hi Scott, and welcome to the community.

All good, thanks for your kind words.

Confirming this and providing context so other readers can understand.

Because your lights are hue bulbs they must have power onto them at all times in order to turn them ON and OFF in Home Assistant. If no power is supplied to the hue bulbs they are just known as unavailable. So if you turn them OFF at the physical switch you have no HA control.

So you are asking; When you turn ON the lights at the physical switch (that then supply’s power to the hue bulbs) you would like to control the light temp and a time delay to then turn OFF you lights. If that is the case then try :hourglass_flowing_sand: Entity - Run ON Timer. The only thing it will not do is set your light temp.

I am not sure if this is what you are after though as this blueprint keeps the lights ON until the trigger goes OFF. Maybe you can confirm exactly what you are trying to achieve if I am not understanding correctly. The reason I say this is because you have your lights controlled via motion sensor. I think you would like to have this motion control but also when you turn your lights ON with the physical switch you would like the automation to just run and if no motion is detected your lights turn OFF in a given time and the automation is ready to receive a trigger from the motion sensor. If that is the case then please confirm.

I also have another blueprint called :gear: Turn Light, Switch or Scene On & Off with Trigger Conditions. I am going to upgrade it so it reflects this blueprint light control. I could add a timer to that blueprint and would also have light control.

Your 2 edits regarding by-pass are working correctly but again need to confirm if I am understand correctly first. I wouldn’t use the by-pass like this.

I will wait to hear from you

Hi, I’m having some trouble getting this working. I am using an Aqara motion sensor, and a light to turn on. It doesn’t trigger even if I keep it as simple as possible, with no options, just a time delay of 5 mins to turn back off. When I check the “Trace Timeline”, it says "Stopped because of unknown reason "null", anything basic I’m doing wrong? :smiley:

Hi I have been using this blueprint for a few months, and it’s been great especially when we have been growing our smart home. This blueprint helped to reduce the number of automations and complexity in our household, so thanks for that :slight_smile:

The main issue is the time limit of 30 mins for motion detection to keep the lights on. She has a home office, and it works quite well when she goes in / out of her office or has a drink of her coffee to detect her motion, but when she is in work mode, she barely moves as she works on the computer. Before using this blueprint, we had its time out at 60 mins, and this was the sweet spot. Could the 30 mins be increased to 60 mins?

It would help save some drama in the house, especially if she gets annoyed by the lights turning off while working. She visually demonstrates that she has to wave her arms around and look like “*Wacky Waving Inflatable Arm Flailing Tubemen” from Family Guy, which gets me into hysterics but gets me into more trouble while she explains her frustration with the lights. Could you please increase it to 1 hour? You would save me from getting into trouble, then trouble again from laughing at her arm impressions. :slight_smile:

just go in the /config/blueprints/automation/blackshome folder , open the sensor-light.yaml with a text editor ( notepad for example) and look for these lines:

    time_delay:
      name: Time Delay
      description: The delay time to leave the lights on after the last trigger from ON to OFF state is detected.
      default: 5
      selector:
        number:
          min: 0
          max: 30
          step: 0.5
          unit_of_measurement: minutes

max :30 is what you want to change.

@petersv

Hi Sveip, Could you provide us your YAML of the automation? To do this go into your automation, top right 3 dot, Edit in YAML, copy all the code, back to the forum and in your reply at the top tool bar click on “</>” and paste code.

Can you also provide a screenshot of your trace timeline.

Edit: At a guess, I would say your using and area, or a device and not an entity in your “Lights - Switches - Scenes”. See The Settings & Best Practice Guidelines: Click Here.

Thanks

Blacky :smiley:

@Dimmers

Hi Dimitri

You don’t need to change any code as it will make it harder to upgrade. Just simply type the number you would like “60” in and click save and your done. :+1:

Blacky :smiley:

Thanks for the prompt response Blacky! You were absolutely right in your assumption, I wasn’t using entities. Sorry for the rookie mistake, and it says it right there that it’s the only supported type. Well, I guess it’s true what they say, it’s your eyes that turns blind first :smiley:

Cheers,
Peter

1 Like

@petersv

No problem, thanks for letting us know :+1:

Hi,

Thanks for getting back to me. At the moment using your blueprint, when I turn the lights on at the wall switch they stay on and don’t go off. If they went off then the motion sensor would trigger the light to turn on next time.

I’d be happy for the bulbs to turn off automatically after the wall switch turns them on, color temp and brightness is a nice to have. I’ll take a look at your Entity - Run ON timer blueprint and see if it will do what I need.

Thanks again for your help

If you turn your light ON and you trigger the motion sensor they should go OFF.

Hello, this is really awesome blueprint. one question I have is: Is there a way to enable night light bases on the binary sensor instead of time? In my case, the “night mode” for my house is based on a binary sensor and I would like to keep things in sync rather than the light acting with its own schedule.

@Leo45

Hi Leo, firstly welcome to the community.

This is something on the road map. What binary sensor are you using?

1 Like

To be more clear, when I say binary sensor, I actually mean input_boolean (we created a helper for it). We have a button to enable it and we only enable it when our kids go to bed (the time could be different, depending on when they want to sleep). Once the night mode is enabled, the main ceiling light is not going to be triggered by motions, only some light strips will turn on.

@Leo45

Thanks for letting us know.

thanks for that :slight_smile:

thank you :slight_smile:

@Dimmers

Your welcome.

Thanks for the awesome blueprint.

@Renzikushi

Welcome to the community :wave:

Your welcome :smiling_face_with_three_hearts: