@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
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:
- 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?
- 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?
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
First welcome to the community
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 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
Nice one
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
Welcome to the community
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
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
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 , itâs really full! What about an external script or something else in HA (software switch? ) that detect Shelly switch-on and fire the automation? Sorry but Iâm really new to HA!
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.
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
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.
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
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
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?
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
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!