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

Just shifted all the ones with scenes to a simple light. Using the relevent colour and brightness levels.

They don’t survive a restart. Just stay permanently on.
Could it be that because the lights are on a zigbee2mqtt connection that the automation starts too soon, before the lights state is recognised as being on?


Perhaps a longer or configurable delay is needed to deal with how long it takes HASS to settle after a reboot?

@richsimpson

That could be the case. In this next update maybe try and put in some toggle helpers into “Scenes & Scripts - Toggle Helper”.

Let me know if that works.

Blacky :smiley:

New update 5.9

Your lighting experience, your way – take control and customize it to perfection! :bulb::sparkles:

New Feature :new:

Changes to Scenes & Scripts

We have added three new inputs.

  • Scenes & Scripts - Toggle Helper
  • Night Lights - Scenes & Scripts - Toggle Helper
  • Yes - Manage OFF script when crossing over

The purpose of adding these inputs is to ensure the proper functioning of automations when using scenes or scripts. The benefits of adding these inputs include:

  • You can now adjust the lights associated with your scenes and scripts after they have been activated, preventing them from resetting with each trigger.
  • With the addition of these inputs, you can create glow lights for night settings within a single automation, eliminating the need for multiple automations. A detailed guide on this process can be found Here.
  • When using scenes or scripts in conjunction with ambient options, selecting “Yes” for your site conditions will ensure that your lights remain on when the LUX value goes high.
  • There’s no longer a requirement to add just one entity in “Lights - Switches - Scenes - Scripts” or “Night Light”. Simply incorporate a toggle helper into the new “Scenes & Scripts - Toggle Helper” inputs.
  • By including “Yes - Manage OFF script when crossing over” in the night lights lighting control options, you can ensure that a script runs smoothly when transitioning between normal lights and night lights, even when the lights are off, allowing for different OFF settings to be applied.
  • Home Assistant (HA) restarts will now recognize whether your scenes or scripts lights are ON and perform the correct actions. This feature can also be helpful when using lights or switches on different platforms, as HA may take longer to recognize their ON status after a restart.

Maintenance :toolbox:

  • From your feedback to create a manual we have updated a lot of input descriptions to better help understand what they do and also provided more links directly to the blueprint FAQ’s. This will hopefully help you find what you are looking for when setting it up.
  • Code realignment.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning:

2 Likes

Awesome @Blacky I do have a feature request for your add-on movie theater blueprint. Reed’s smart home on YouTube had a new video that does a similar thing to your blueprint, BUT he added the ability to have different lights/scenes based on the app on the Apple TV or Chomecast that is open. For example, for Spotify or Apple Music you could not dim the lights, but with Netflix, do a full movie dim. I think app specific conditions would be amazing.

@DuckDuck25

Thanks for your suggestion. I will look into it :+1:

Blacky :smiley:

FAQ - How To Create A Toggle Helper?

When using scenes and scripts, it is recommended that you create a toggle helper. Below, I’ll show you how to do this.

Go to Settings / Devices & Services / click on the “Helpers” tab at the top / create helper and select toggle.

Input the name you would like to call it, select an icon if you like and click create.

28

Enjoy

Blacky :grinning:

Back to FAQ: Click Here

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

FAQ - How To Create A Schedule Helper?
FAQ - How can I to turn the light on at sunset but turn them OFF at a set time?

You can use a schedule helper as the trigger. Below, I’ll show you how to do this.

Go to Settings / Devices & Services / click on the “Helpers” tab at the top / create helper and select toggle.

Input the name you would like to call it, select an icon if you like and click create.

If you would like to turn your your lights, switches, scenes, or scripts ON when the sun sets, then you would select a time well before the sunset and enable the sun condition. This ensures that the trigger is ON well before the sun sets but waits for the sun condition to turn your light ON. Then, the schedule will turn your lights OFF as per your schedule.

Example

This will activate your lights, switches, scenes, or scripts when the sun elevation is below -1.5 because the trigger schedule is active having an ON time 4pm. Conversely, it will deactivate them at the end of your schedule, well before the sun rises above -4.0.

Enjoy

Blacky :grinning:

Back to FAQ: Click Here

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

I have a timing problem that I need help with.
I would like the automation to be active between 5 am am 8 am, than again from 4 pm to 9 pm. The automation is off otherwise. How can I achieve this? Time settings only allow one time range. I need it to be triggered by the motion Detector, so a schedule helper doesn’t seem to be the answer.

@rananna

You can use a schedule helper but your ON time will be the opposite to when you would like the automation to be active. Then you would put the schedule helper into the bypass option 2. Below is a example of the schedule. Then you wouldn’t use the time option :wink:

Blacky :smiley:

This is just great. Just what I needed. Thank you so much for this. :partying_face:

Unfortunately I think I may have found a bug in Version 5.9 of this blueprint. This will prevent to turn ON lights using bypass ON.

To reproduce use blueprint with scripts to turn on, therefore a toggle helper and a bypass ON and bypass OFF helper.

  1. Turn lights on by enabling bypass ON.
  2. Turn lights off by enabling bypass OFF. (and disabling bypass ON)
  3. Turn lights on by enabling bypass ON.

Expected
The light turns on again.

best regards

Actual
The light stays off. I noticed, the toggle helper is still on. If I turn the toggle helper off manually, the lights turn on again.

Thank you. That works great!

@voydz

Yep you are correct there is a bug in the bypass when using scripts and scenes. Sorry about that :pensive:… I will have to fix this ASAP.

Thanks for letting me know :+1: and keep an eye out for the next update.

Blacky :smiley:

@rananna

No problem, glad you are up and running.

Blacky :smiley:

You just rock. Thanks so much :slight_smile:

@voydz

This has been resolved, a new update is coming out now. Let us know if I got everything.

Again thanks for your help.

Blacky :smiley:

1 Like

New update 6.0

Your lighting experience, your way – take control and customize it to perfection! :bulb::sparkles:

Bugs Fixes :bug:

  • Fixed bugs in By-pass when using scenes or scripts.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning:

Thanks for all this, looks great. Haven’t made it work yet. Can the entity be a dimmer switch? If so, how is the light level set?

@skome

If you can use HA to adjust the brightness then you should be good to go.

Try it out and let me know how you go.

Blacky :smiley:

It’s probably me and my settings, and unfortunately I have to ask questions now.
Version 5.9.

I have the lights first half of the blueprint working fine for P1 Aqara Sensor detects motion, turn on light 100%.
Time mode, 6 PM to 9 PM. Adjusted to test.
Green entity bedroom bulb.
Works every night.

Trigger is Aqara P1 motion sensor.

That worked and still works if I change the times to test and turn off/disable night lights.

I also had nightlight working for one night.
That has stopped working.
Also time based. 9 PM to 6 AM
Green entity, same bedroom bulb.
Even if time is changed to now time and tested.

I’be used do not disturb as a night light entity state.

I think I used the same motion sensor as the toggle on night lights seemed to work for one night. So many changes and tests I don’t remember. Lol

Rearranging the times and toggling DND to test night. Nothing.

P1 is always detecting motion and occupancy, not using occupancy, only motion. They both clear also.

I’ve tried DND as the night toggle, battery charging, the same motion sensor etc. If I manually run the automation, you can see the bulb is at 20 percent, times out, goes out, but wont fire again if time is adjusted and saved…

I am getting an error occasionally which I’m too newb to ID. And may or may not even be associated. But only a couple of times. No clue.

:frowning: My apologies, I’m a newb to HA anything, but learning fast.

yes, this works in HA already as a scene triggered by the motion detector.
But with this blueprint I tried setting it with the motion detector as the trigger and the dimmer as the entity but nothing happens. But I don’t see where to tell it what the dimmer should do, what the brightness should be. I tried the Light Control options. What else should I try? TIA