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

@Blacky your blueprints are awesome. Question though… I know this were intended for triggering by binary sensors, but is there any way to trigger it with a stateless device (in my case, a zigbee button)? Nothing for it comes up in the entity list and I cannot quite figure out how to use it as part of your blueprint in addition to (or instead of) a binary sensory. If there is an easy way, I’d appreciate the help. I am not a super-advanced HA demigod so please keep the instructions simple :slight_smile:

Thanks for your help, after adding an entity on top of the scene it works fine now.
Maybe an enhancement for the future to make it work with scenes without adding an entity?

Hi @Blacky,
thank you very much for this blueprint! I’m new to HomeAssistant and I’m using your blueprint to automate bathroom lights using Shelly plus 1 mini and Aqara Motion P1 sensor and I have two unsolved question:

  1. When I turn on light using phisical switch attached to Shelly SW pin (edge switch) whitout firing Aqara motion sensor (phisical switch is placed outside the bathroom) then ligth doesn’t turn off after specified timeout. How can I solve?
  2. Bathroom has two light bulb (and two Shelly). I need to turn on first light/shelly only on motion and turn off all of two light/shelly after timeout. How can I do this?

Many tanks.
Danilo

@Blacky You know, I like your blueprints a lot, and your clear descriptions what it does.
I could re-import (pretty new feature of HA) your blueprints to upgrade to the most recent version - except this one (sensor light).
I am on version 5.2, and I got there using the “old” method to upgrade, means replacing the code via file editor and reload all automations.

How could I get “re-import” to work with this one?

@Seger85

And to you and your family.

The new selection “If lights are ON, adjust the lights when crossing over” will adjust your lights to the new setting if the lights are ON but if no motion is detected then the light will turn OFF after the set time delay. So it is still working off the trigger.

Blacky :smiley:

@jonathanbartlett

First welcome to the community :wave:

No the automation needs a state from ON to OFF and from OFF to ON. You can create a template binary sensor that will toggle when you press the button or you can create a by-pass and then use my other blueprint :nazar_amulet: Press Button - Turn ON & OFF Entities to toggle the by-pass ON and OFF with your zigbee button. Use option1 for the by-pass.

Blacky :smiley:

@mars2020

Nice one :+1:

Unfortunately this is how HA and scenes work so it will be up to HA. I have however taken this into account an made the blueprint work with this workaround.

Blacky :smiley:

1 Like

@danilomariotti

Welcome to the community :wave:

Your welcome.

If you turn the light on manually it will not trigger the automation. Currently we can’t use the light as a trigger as the automation will not work. But if you turn the light ON and then trigger the motion sensor the automation will run and turn you light OFF. You could get a Shelly 2PM and use one for the light but don’t connect it to a switch and the other contact connected to the switch to control the by-pass and use the by-pass auto OFF to do what your trying to do.

Add the first light in as an entity and then create a scene with the second light OFF and enter the scene “Scenes - Scripts To Turn OFF”.

Blacky :smiley:

@nicknol

Thanks for you kind words.

When we do this I haven’t added the URL in the code to the blueprint (maybe I should do this from now on). When we use the import blueprint HA adds this URL but if we update it the old method we then remove it. So if the file location is correct all we need to do is to use the import blueprint button again and it will be detected and update it. Then the URL will be added again automaticity by HA and you can use the new HA feature to update the blueprint.

It is in the FAQ and the link is below for a full step by step guide.

  • For HA version 2023.12.0 + Please follow these steps Click Here

Blacky :smiley:

Hi @Blacky ,
thank you very much for your reply.

If you turn the light on manually it will not trigger the automation. Currently we can’t use the light as a trigger as the automation will not work. But if you turn the light ON and then trigger the motion sensor the automation will run and turn you light OFF.

yes, this is what’s happening

You could get a Shelly 2PM and use one for the light but don’t connect it to a switch and the other contact connected to the switch to control the by-pass and use the by-pass auto OFF to do what your trying to do.

yes, it could be a good solution but the Shelly 2PM really doesn’t fit into my electric box :sweat_smile: , it’s really full! What about an external script or something else in HA (software switch? :thinking:) that detect Shelly switch-on and fire the automation? Sorry but I’m really new to HA! :innocent:

Add the first light in as an entity and then create a scene with the second light OFF and enter the scene “Scenes - Scripts To Turn OFF”.

Perfect! I wasn’t sure I colud put there a scene even if I used a switch in “Lights - Switches - Scenes - Scripts”

Danilo. :wave:

I don’t think the Shelly exposes a different switch into HA. It is just one switch. Example walk into the area and let the motion sensor turn the light on. Then look in HA and you will see the switch and the light is ON. Now if this happens when the motion sensor turn the light on it also turns the switch ON. You can’t have a trigger triggering another trigger to control the trigger. You can set up a independent switch to turn the light ON manually and use a time delay to turn it OFF. The by-pass will help you achieve this.

Blacky :smiley:

Hi,

I have just discovered the Blueprint. Are there plans to change the color temperature via the dynamic light option? I would like to have white light in the hallway during the day and increasingly yellow light in the evening when it gets darker.

And is there a way of switching the light to a different value after the motion detection has finished instead of switching it off? e.g. to 10% brightness, so that it stays on as light background lighting.

Thank you!

That’s how I understood it, but that’s exactly what’s not happening for me. The lights are set to the new values, the movement is still present, I have the FP2 sensors. But the lights go out. It is strange that the lights in the HA Ui are displayed as “On” with the new values. Could it be a bug? Or do I still not understand it?

Many thanks and best regards
Seger

Works like a charm! Many thanks for, again, your clear description and recipes.

@bingo5

Yes but I can’t give a time line for this, it is on the list.

This to is under development (on the list) for now we use the “Scenes - Scripts To Turn OFF”. Create a scene with your lights at 10% and enter it there.

Blacky :smiley:

This is very strange. To have HA display as ON and they are OFF. I have tested it many times and it works. I also just tested it again and it works perfectly so I don’t think it is a bug in the blueprint. If your FP2 is ON and you transition to from normal light to night lights or from night light to normal lights everything should cross over to the new settings and the lights should stay ON as long as the trigger is ON and it hasn’t timed out.

Have a look at the trace line to see what the automation is doing. Also have a look in the logbook to see what turned the light OFF. Could something else be turning it OFF? I am very interested to go through this, as if it is a bug in the blueprint I would like to squash it.

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.

Blacky :smiley:

@nicknol

Nice one, glad you up and running and thanks again for your kind words.

Blacky :smiley:

Hi @Blacky , thank you for this very impressive blueprint. Honestly this is beyond what I could do by myself!

I do have one use case for it which I’m having trouble to set up.

I have this light I want to turn ON on a motion sensor trigger, and automatically turn off after a set amount of time. Up to that point pretty easy to do! No problem there.

Now the difficult part is I want to prevent the automation from turning the lights on if the TV is on. I already have a template binary sensor to expose the TV state as simple ON or Off state. That’s the part I’m struggling with. What facilities do I use in the blueprint to do this.

Furthermore, I would still want the automation to turn lights off after some time if they were turned on manually. Can your blueprint do that as well?

@psyko_chewbacca

If you have a binary sensor that is ON when the TV is ON and OFF when the TV is OFF all you need to do is add this binary sensor into the bypass and choose option 2. This will force the light OFF if it is ON when your turn the TV ON. Then adjust the “By-pass - Time Delay”. If you would like it to go OFF instantly set it to “0”.

You have to have an independent switch to do this and use bypass option 1. Then use the by-pass auto OFF for option 1.

Blacky :smiley:

Thanks for the quick reply. Maybe I wasn’t all that clear but what I want is to prevent the trigger of the automation when the TV is ON. The lights in question here are close to the TV and they could be distracting to a viewer if they are turned on.

What I get from your statement is setting up the bypass like you say will simply turn OFF the light if they are ON and the TV is turned ON. I don’t want to turn OFF the light as the TV turn ON. I just want to prevent the automation from running while the TV is ON.

Thanks again!