No the blueprint will switch your light on and off with a trigger. The trigger can be any binary sensor. Normally people will use a motion sensor as the binary sensor.
Note: If you turn the light on manually and the motion sensor detects motion the light will turn off automatically. It is recommended to use the âTrigger Sensor By-passâ option if you would like to keep the lights ON or OFF for extended time periods.
Thanks for providing your YAML. Your time option is 24/7 if you add your 6 to 22:30 & 22:30:01 to 5:59:59 less 2 seconds. The âUse The Time Options (Optional)â is global and will also include you night light time, so it stops when you would like to have you night lights work. Because you are not using any weekdays and you would like 24/7 just select âDisable the time optionsâ in "âUse The Time Options (Optional)â. and you will be good to go.
I have also noticed you are using devices and you have selected âYES - My Ambient Light Sensor is affected by the Lightsâ. This option will only work if you have at least one entity selected. In you devices do you have multiple entities? Click on the â<>â and expand your devices out. You must have at least one entity selected for this option to work in âLights - Switches - Scenesâ and in âNight Lightsâ.
This shows it expanded into entities. Now the âYES - My Ambient Light Sensor is affected by the Lightsâ option will work. If I click on the âXâ I can remove an entity if I like.
Ah no, I want to turn off the light even if I turned it on manually. Because everyone forgets to turn it off
Than everything works as I need it. Thanks
You can turn it in manually but for this blueprint in order for it to turn off after you have turned it on the trigger must be triggered (motion sensor) after it was turned on.
If you are looking for other options then you may want to consider some other blueprint I have created. It is realy up to you and what your trying to achieve. Below are 2 links to some other blueprints of mine.
No it is totally what I was looking for. But never was patient enough to check if it works like this.
Use case is:
Someone is going to the toilet but the light is to bright to trigger the automatic light even when the motion sensor is triggered when you enter the toilet.
Then you switch on the light manually. But then no one is turning the light off because why But when you then leave the toilet the motion sensor will go off and turn the light off. Even the automation did not turned it on.
So thats what I need. Totally fine. You saved me at least 50% of the motion automation I did before and with the time and the lux sensor it is even more configurable.
TIP: When pasting code into this forum use the â</>â button as it will then display correctly and be much easer to read.
When using the âUse The Time Options (Optional)â this is a global time, so it also has to include your night light time.
So currently you have your time set to â18:00:00â to â21:00:00â so the automation will only work between this time period. You will need to include your night light time and set it to â18:00:00â to â07:00:00â. Then your night light time can be â21:00:00â(or â20:59:00â) to â07:00:00â
I have in-wall smart switch module wired to regular switch for my kitchen. Lights are also normal spot lights. I use motion sensor as binary sensor. Can I use by-pass feature of this blueprint with that setup? It kind of works but not perfect. Switch toggles itself off than on immediately after time delay if I am still in the kitchen. If I am not, it turns off normally. I hope I explained clear enough. Is there anything I should consider? Such as my smart switch settings? Currently it is set to âstateâ mod of operation. Other 2 options are toggle and momentary. Thanks in advance.
Just to add, âswitch.kitchen_lights_l2â and âlight.kitchen_lightâ are basically the same thing. I used HA change device type and defined switch as light. That might be the reason why it wont work correct as I have to choose different entities. Hope there are some workaroundsâŚ
One problem I have is that it doesnât seem to work with the adaptive lighting component,
When the lights turn on, they flash to full brightness white, then turn to the correct intensity and colour temperature. I canât work out why this happens.
My old automations that I made used the turn on command and adaptive lighting turned the bulb immediately to the correct brightness and colour temperature.
In order for it to get to the end of the time delay there must be no motion detected or by-pass setting causing this.
This normally relates to what type of physical switch you are using. If you can see your switch turning ON and staying ON until you turn it OFF then that is a good start.
Below is a screen shot from a Shelly 1PM. This is how Shelly has set it up. I use toggle but you realy need to know what type of switch you have, how it works and follow the manufacture instructions of your smart switch.
Yep you cant do that. This is you problem âby-passâ. The by-pass entity cannot be used in âLights - Switches - Scenesâ and or âNight Lightsâ selections. So looks like you piggybacked the âlight.kitchen_lightâ and created another entity called âswitch.kitchen_lights_l2â. If you would like a physical switch it must be totally separated or you can crate a by-pass without having a physical switch. To do this see our FAQ on " Q: How to use the âTrigger Sensor By-passâ without having a physical switch?".
I would remove your âswitch.kitchen_lights_l2â and create a âTrigger Sensor By-passâ without having a physical switch and you should be good to go.
Hi @woowoo we should be able to sort this out. 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.
Is it possible to add some logic so that when Home Assistant gets restarted or the automations get reloaded, lights that were on when the event happened will be turned off? Iâm asking because Iâve had the situation that a light in my shed happened to be on at the time i did a reload of my automations and as a result of the reload this light wasnât turned off automatically anymore. It was a few days later before I saw it was still on and turned it off manually.
I know that the both below triggers can be used for triggering the automation. Adding these triggers can however have the -for some possibly unwanted- side effect that a light may get switched off after a reload or restart even though that light wasnât switched on by the automation, so maybe if you add these triggers, we also need another setting to enable or disable this feature.
trigger:
- alias: When Home Assistant starts
platform: homeassistant
event: start
- alias: When automations are reloaded
platform: event
event_type: automation_reloaded
I ended up creating helper but it is not actually what I am looking for and not sure if my need is possible with current setup. I just want both trigger and switch available at the same time. For instance if I walk in the kitchen lights turn on. Motion timeout is lets say 2 minutes. Then if I switch the flip switch to normally âonâ position, keep lights on and wait longer than 2 min to turn off the lights. With the helper, I need to open HA to disable trigger sensor totally.
It doesnt look like possible on hardware level i guess .
Edit: Okay I think I figured. I need 2 gang smart in-wall module for 1 gang flip switch. Flip switch would be the by pass switch and I need to wire ceiling lights to other output on module which wont have any physical switch.