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

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:

FAQ - Schedule Helper & Time of the Day Helper + Pro Tips

Schedule Helper

The schedule helper lets you set a time based trigger to turn ON and OFF your lights. You can set different time for each day and have it trigger multiple times in any given day.

Times of the day sensor helper

The times of the day sensor helper lets you set a time based trigger to turn ON and OFF your lights. This is for the same time of every day.

How to create a schedule helper our a time of the day sensor helper.

  1. Go to settings / Devices and Services / click on the helper tab at the top, then click create helper.
  2. Then click “Schedule” or “Time of the day” and input your settings as required.

Pro Tips

What if you would like your lights to come ON when it gets dark or when the sun sets, to then turn OFF later at a given set time. You might like the light to come ON at a set time and turn OFF when the sun rises. You might like it to turn ON when the sun sets and turn OFF when the sun rises. You might like to use the ambient sensor rather than the sun. I will show you some examples below but there is just way to many options to explain them all. Hopefully this will help you understand enough to then start implementing your automations to suit your needs.

Our example goal is for the light to come ON when the sun sets and to turn OFF at 11:00pm.

  1. First you will need to create a schedule helper or times of day sensor helper as described above. Because the sunset time changes throughout the year we will also need to use the sun condition. Our helper ON time will be set to the earliest time the sun ever sets throughout the year. If the earliest time the sun will set is 5:17pm then it is safe to set the ON time to 5:00pm. Our OFF time will be 11:00pm.
  2. Once the helper is created we need to add this as the trigger.
  3. We then will need to enable the sun condition and set the sun elevation setting to our liking.
  4. Click save, and you’re done.

The lights will now turn ON when the sun sets and turn OFF at 11:00pm.

But what happens if you would like the light to come ON at 9:00pm and turn OFF when the sun rises in the morning.

  1. First you will need to create a schedule helper or times of day sensor helper as described above. Because the sunrise time changes throughout the year we will also need to use the sun condition. Our helper OFF time will be set to the latest time the sun ever rises throughout the year. If the latest time the sun will rise is 7:25pm then it is safe to set the OFF time to 7:30am. Our ON time will be 9:00pm.
  2. Once the helper is created we need to add this as the trigger.
  3. We then will need to enable the sun condition and set the sun elevation setting to our liking.
  4. Click save, and you’re done.

The lights will now turn ON at 9:00pm and OFF when the sun rises in the morning.

On how to set up a schedule helper and a visual example to use with a sun condition please click here.

But what happens if we would like the light to come on when the ambient goes below the set value and turn off when it rises above the set value.

  1. First you will need to decide what you would like for the trigger. You might like it to operate at different times on any given day, then you would choose a schedule helper. You might like it to operate the same time every day, then you would choose a times of day sensor helper. You might like it to operate 24/7 then you could use any suitable trigger that would set the trigger state to ON and never turn OFF. Once you have decided what trigger you would like, then just add it to the automation trigger.
  2. We then will need to enable the ambient options and set the settings to our liking.
  • If you would like your lights to turn OFF when the ambient value increases then your ambient sensor can’t be effected by the lights and the site conditions must be set to “NO - My Ambient Light Sensor is not affected by the Lights”.

In this example we will set our site conditions to “NO - My Ambient Light Sensor is not affected by the Lights”. Then set your LUX value.

  1. Click save, and you’re done.

Depending on what you have chosen to use in the trigger, the lights will now turn ON and OFF depending on you ambient light value setting.

I hope this helps you get a better understanding on how to use the conditions, sun, ambient and time to turn ON and OFF your lights.

Enjoy

Blacky :smiley:

Back to FAQ: Click Here

Back to “The Settings & Best Practice Guidelines” Click Here

2 Likes

Hey @Blacky I still owe you an answer here…
I was going to your guide and tried several things but this was not what i was searching for. So i found out that there is functionality to create scenese on the fly. (Scenes - Home Assistant)
With this it was very easy to create a automation for my needs.
Thank you anyway!

1 Like

Just discovered your blueprint, it works like a charm, thanks for all the efforts! It is capable of a lot more features than I actually needed, as I only was looking for entity based motion activated light with override (which this one does too). Installed it and worked immediately, the solar elevation angle is a nice additon, playing around with that. Shoutout to you for the great work.

1 Like

@ChielB

Thank you for you kind words :smiling_face_with_three_hearts:. Keep an eye out as a new update will be out in a day or two… we are just doing the final testing / QA.

Blacky :smiley: