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

@jeleniain

Glad you like the blueprint.

The only way I can see this and I have never thought about it or tested it would be to have a by-pass in option 2 OFF. Have something turn the by-pass ON @ 22:00 and OFF @ 8:00. Then when you get up early you manually turn it OFF and if your motion is ON the light will come ON and it will stay that way (normal automation operation) until @ 22:00 it will get turned ON again restarting the cycle. Then time is not required.

Blacky :smiley:

That is a good idea, ill try it out :slight_smile:
Thanks!

Dear Blacky,

I spend hours with my friend to find the cause. Root cause is: I am stupid.
I had a second instance of Homeassistant running. The links to import the blueprint pointed to the old instance. Sorry for bothering you and thank you very much for your help. Now it works.

@Wilko

All good it happens to all of us, so your not alone. Glad you worked it out and got it going.

Thanks for letting us know :+1:

Enjoy

Blacky :smiley:

First of all, thanks for this great Blueprint… I love it!
My lovely wife has a question (request) about the blueprint.

We have 5 motion sensors here in the house, and the lights turn on with the “Use The Dynamic Lighting Options (Optional)”, so the lights changes during the day.
All motion sensor have a 1 or 2 minute time periode, because the sensors are all in areas that you just pass through. So normally you wont stay long in these areas.

Sometime though, my wife wants to clean the areas, and then she wants the light to go on with full brightness, and that the stay on longer (lets say 5 minutes).

Is there a way to set this up in de blueprint? I did see the option “Use The By-pass Options (Optional)”, but as far as I can see, I can only change the delay, and not the brightness value…

I really hope that the option is there, or can be build in. It would be super helpful.

@Hassio

Thanks for your kind words.

For this I would do this and see if it works for you.

  1. Create a toggle helper maybe call it “Cleaning”. FAQ shows you how to do all this.
  2. Use by-pass option 3 Keep current state and enter in the toggle helper “Cleaning”.
  3. Install this new blueprint :gear: Turn Light, Switch or Scene On & Off with Trigger Conditions
  4. Enter in all the light you would like to trun ON in the new blueprint and set your brightness.
  5. Enable “Use The Entity State Option (Optional)” and enter in your by-pass toggle helper “cleaning” you use for by-pass in the sensor light option 3.

Now when you tun on the by-pass the automation will be disabled and turn on all the lights in the new blueprint.

TIPS:

  1. In the sensor light blueprint you can use the by-pass auto OFF that may help you.
  2. You can use the same toggle helper “cleaning” in all your sensor light automations and in the one automation using the new blueprint just add all your lights… then when cleaning the whole house goes ON with one toggle.

Hope this helps you.

Blacky :smiley:

1 Like

thanks you for the quick reply.

But from what I can read/understand/see, I only have a brightness option there right? I also want to set the Kelvin to 4000.

Is the option there somewhere, because I cant find it.

Hi, thanks for the response. I just tried again. First re imported the blueprint to be sure up to date. This time it worked right.

Great work!

@Blacky

For some reason the motion sensor doesnt work at all with these settings.
I did look at all settings, but cant find the problem why it doesnt work.

EDIT:
If I turn on the cleaning toggle, the light is going to 100%, even if there is no motion.
When I turned the cleaning toggle off, the light turns off and the motions sensor started working again. So

  1. The settings are not right, or…
  2. I didn’t mention that the settings should only work when there is motion. (also the cleaning mode

So if the cleaning toggle is On, (and) there is motion detected…The light should go to 100% brightness and 5000 Kelvin. If the Cleaning toggle is Off, the normal motion sensor behavior should be triggered.

@Blacky Thanks again for this amazing tool! I have it set up in several rooms and it is working perfectly, but I’d like to add in one extra level of complexity in our family room when we watch TV. Currently, I have two lamps that turn on/off with occupancy and can be interrupted by a switch. What I would like to do is have one of the two lamps turn off when the TV is turned on since it causes a glare. I’m thinking I might need a second virtual switch in HA that is activated by the TV turning on and will interrupt the blueprint so the lights are no longer controlled by motion. Is that a viable approach? I’m at the edge of my HA abilities, so any suggestions from the community would be appreciated.

Thank you for the this blueprint, struggling with one question I cannot find the answer to. I want to use the ambient option to only turn lights on when it is dark. I am however using a binary sensor that just provides a ON/OFF instead of a Lux value.

Can I use this type of sensor? The blueprint seems to only select luminance types

Nice one, thanks for letting us know.

Blacky :smiley:

@Hassio

If you are not using night lights then use the “cleaning” in “Enable entity state option” option for night lights. Then set up your lights as required under night lights.

.

If you are using night lights then you will need to create another automation useing this blueprint and have your “cleaning” toggle the automations. Like this;

  1. In the main normal mode automation by-pass option 3 add “Cleaning” helper.
  2. Create a new template binary sensor go to helpers / create helper / template / binary sensor / in states add this. Let name this “Cleaning Lights”.
{{ is_state('input_boolean.your_cleaning_helper', 'off') }}
  1. Create your 2 automation with your lights as required.
  2. Then add then new template binary sensor (Cleaning Lights) into your 2nd automation by-pass option 3.

Now when you turn ON your “cleaning” helper your main automation will be disabled and your “Cleaning Lights” will be turned OFF enabling your 2nd automation activating your cleaning mode you would like.

Let us now how you go.

Blacky :smiley:

@kman42

First you need HA to know your TV is ON or not. Some TVs have a integration or something that works for HA. If not a smart plug can do this. If you use a smart plug then create a template binary sensor using this code. go to settings / devices & services / helpers tab / create helper / template / binary sensor / add your name (lets call it “TV ON”) and in “state template” use this code adding your smart plug entity in and adjusting the 85 to your requirements (when TV is ON/OFF check power and adjust).

{% if states('sensor.your_power_sensor_here')|float > 85 %}
  on
{% else %}
  off
{% endif %}

If you are not using night lights then use the “TV ON” or you TV may have a state when it is ON already and you didn’t need to create the template sensor using a smart plug… what ever it is use it in “Enable entity state option” option for night lights. Then set up your lights as required under night lights and you are done.

If you are using night lights see above post for a rough guide as it is the same way… create another automation …

Let us know how you go.

@fvhemert

Welcome to the community :wave:

If this is the case then you will need to use your binary sensor in the by-pass option 2. Your binary sensor has to be OFF when you would like the lights ON. Not sure if you can edit your binary sensor to do this. If not create another one using your binary sensor you have making it work the opposite way like this.

Go to settings / devices & services / helpers tab / create helper / template / binary sensor / add your name (lets call it “LUX Dark”) and in “state template” use this code

{{ is_state('input_boolean.your_binary_sensor_here', 'off') }}

Then add “LUX Dark” to the by-pass option 2

Let us know how you go.

Blacky :smiley:

@Blacky thanks for the quick reply. I’ll give it a try this weekend and post the results.

Thank you again for the quick response.

The nightlight option is working :slight_smile: , but the problem is that I do want to use the nightlight option later on.

The other option is (for me) to much a work around, and I am afraid I cant recall the automation later on. I know that this is not your problem, but I am not a everyday poweruser of HA. So I do want to make things as understandable as possible for myself.

May I brutally ask if there is a plan to add the Kelvin (and maybe the transition) option to the bypass option? That would solve all the problems. And I really do think there are more people who want to override the settings (bypass) with other settings then the original, and not only change the delay.

There are a ton of options you can use the bypass option for, if you can change the brightness and Kelvin.

@Hassio

Nice one

This is a problem for me to as it keeps growing and has so many scenario / options to keep track of.

This will grow the automation. Then there so many more different options. The best way is to provide the by-pass trigger then the user can go in any direction they like.

Blacky :smiley:

FAQ: How to use scenes and scripts

Scenes and scripts are powerful tools in Home Assistant that allow you to automate and customize your smart home. These tools enable you to create specific states or sequences of actions for various devices, giving you complete control over your environment. Whether you want to adjust lighting, set an ambiance, or orchestrate complex sequences, scenes and scripts offer flexibility to personalize your experience.

Personalize Your Lighting – Your Way :bulb::sparkles:

With scenes and scripts, you can control your lighting with precision. Set the different colours or brightness for your lights, or create custom lighting behaviours using scripts.


Scenes

Scenes are ideal when you want to set different colours or brightness levels for your lights, creating unique ambiance or moods. However, if you need to set the same brightness levels or colours across multiple lights, it’s generally better to use the blueprint’s light control options. This method ensures more consistent behaviour and reduces the chances of light flicker, as using entities directly ensures that the blueprint functions at its best.

Why use scenes?

  • Lighting Control: Set different colours and brightness levels for your lights, creating the perfect ambiance.

Scripts

Scripts provide greater flexibility by allowing you to automate sequences of actions based on specific conditions. For example, you can create scripts that turn on or off certain lights or switches depending on the time of day or create special actions you would like to perform when the automation runs.

Why use scripts?

  • Automate Actions: Control specific lights or devices based on triggers like time or conditions.
  • Creative Possibilities: Customize sequences to fit your needs, whether it’s for lighting, switches, or other devices.

Turning Scenes or Scripts OFF

Scenes and scripts are designed to set devices to specific states but are not inherently “active” or have an “ON” state in the traditional sense, so they don’t have a state to “turn off.” To get around this, we need to reset the environment once the automation completes. To do this, we need to create another scene or script to restore the default settings, such as turning devices OFF or performing another set of actions.


Using Toggle Helpers with Scenes and Scripts

Since scenes and scripts do not have an identifiable state, it can be challenging for automations to know when they are active. To solve this, it’s recommended to use a toggle helper when only using a scene or script. This way, the automation system can track whether a scene or script is active and manage subsequent actions smoothly.

How toggle helpers help:

  • State Management: Helps automation recognize if a scene or script is active.
  • Light Control: Works seamlessly when transitioning between normal lights and night lights.
  • Restart Handling: Ensures the correct behaviour after Home Assistant restart.

When configuring scenes or scripts in “Lights - Switches - Scenes - Scripts” or “Night Light,” create a dedicated toggle helper for each input to ensure the automation knows what is going on.


Crossing Over from Normal Lights to Night Lights

When transitioning between normal lights and night lights, toggle helpers become essential. They ensure that the lights switch between states correctly without disruption. To facilitate smooth transitions, you must enable the option “If lights are ON, adjust the lights when crossing over” in the night light settings.

Additionally, you can create scripts used in the “Scenes - Scripts To Turn OFF” section to apply different OFF settings based on whether normal lights or night lights are activated. If you are doing this to help with transitions, also enable the option “Yes - Manage OFF script when crossing over” in the night light settings. This will activate your script when crossing over, applying the desired settings to ensure smooth operation.


By understanding and utilizing scenes, scripts, and toggle helpers, you can create a smart home environment that adjusts to your needs with minimal effort, providing both convenience and personalization.


I hope this explanation helps you understand how scenes and scripts are utilized in the blueprint automation process.

Enjoy

Blacky :smiley:

Back to FAQ: Click Here

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

4 Likes

Great! Thank you. I will try it today