Hi @woowoo transition is under construction.
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.
@inancatl You can do it but you just need a separate switch to turn the bypass on. You can also have that switch if you like turn your lights on and if needed control a time delay. The switch can take the spot of your current light switch.
How it is now, the automation turn the light ON. The switch turn the light ON. That switch canât be the by-pass as every time the automation turns the light ON it also turn the switch ON, and if the switch is the by-pass then every time the automation starts it turn the by-pass ON as well and stops.
EDIT: Just saw your edit. Yes your correct if that is how your smart switch is.
Is there an option the light stays on in the last place movement is dectected? That would be very useful for me.
Hi @oli737 Firstly welcome to the community.
If you are asking it to turn a light on when motion is detected and stay on until you manually turn it off then no, sorry.
If you are asking if you walk around your house and the lights turn on and off as you move around and when you stay in a room then the light stays on? then yes, but you will need to set up different automations for each room or area. To do this you just open the blueprint set your setting for the light and motion sensor located in that room / area and click save, name it (example - kitchen Lights). Then just do it again for the next room and so on.
This is quite a big update You will need to clean up a bit of code in the YAML. I will post a âHow Toâ below. It is quite easy to do ⌠Sorry it had to be done to get transition set up nicely
Maybe consider hitting the at the top post if you liked it.
New Features
- Added transition time for lights.
. You now can set the dimming time (Transition) of your lights when they turn ON and OFF so it is softer on your eyes. You can also use this option to notify you when the lights are about to turn OFF by selecting a longer âTransition - OFFâ time. This can give you a warning indication that the lights are about to turn OFF by slowly dimming and allow you to wave your hands
around so you can trigger the motion sensor and keep the light ON
.
- Added crossover from night lights to normal lights. If the night lights and the trigger is ON when the night lights end time expires, it will now cross over to normal lights.
- Added a safe guard
. It will now check the automation and continue on a restart of Home Assistant
.
Bugs Fixes
- Fixed a bug in light flicker when crossing over from normal lights to night lights.
- Fixed bugs when using multiple triggers.
- Fixed a bug in the by-pass.
NOTE: It will only turn ON and OFF - Lights, Switches & Scenes now. This prevents you turning off automations, etc within an area if an area is selected.
The code is now to big to post at the top. There is a link to my GitHub at the top where you can copy the code and update your files. Click Here to go to the top where you can find the link to my GitHub.
Enjoy
Blacky
FAQ - How do you update the blueprint from version 1.8 - 2.8 to version 2.9 and above?
If you havenât yet installed the blueprint then all you need to do is to click on the big blue button âImport Blueprintâ at the top of this post and follow the steps. Click Here to go to the top of the post.
If you would like to update without deleting all your automations and the blueprint, then reinstalling the blueprint again and adding back all your automations then continue to read. It is very simple to do.
First you need to update the blueprint. If you donât know how to do this then Click Here as I have a âHow to update a blueprintâ already explain for this. Once you have updated your blueprint then come back here and follow the steps below.
You will need to do this for each automation you created with this blueprint.
Go into an automation you created using this blueprint and click on the 3 dots at the top left, then select âEdit in YAMLâ.
You can now see your YAML code. You could see a two different options (see below) but we are looking for the two lines that say âinclude_light_control:⌠& include_night_light_control:âŚâ.
Now you will need to delete the 2 lines with âinclude_light_control:⌠& include_night_light_control:âŚâ as shown below. Then click save.
Then go back into your automation by again clicking on the 3 dots and select âEdit in visual editorâ. You then will need to re-select your selections under âLight Control & Night Lights - Controlâ and click save. Your are done.
If you see something different with a row of dashes and letters, you will need to delete all the dashes, and some with a dash and a single letter â- aâ as shown below.
From this
To this, then click save.
Once you have clicked save, you then will need to re-select your selections under âLight Control & Night Lights - Controlâ and click save. Your are done.
Now just repeat for all your other automations you created using this blueprint.
If you would like to check what you have done then go back into your YAML and it should look something like this depending on your selection options.
NOTE: If you donât see one or both of the lines with âinclude_light_control:⌠& include_night_light_control:âŚâ then you have never selected these options and your already good to go.
Enjoy
Blacky
Back to FAQ: Click Here
FAQ - How do the time options work including night lights time?
Below are all the time settings and what they do.
Using Time Options (Optional)
Enabling time options allows you to set specific start and end times, and define weekdays, restricting the automation to run only within the chosen period. These settings act as global conditions and can be used alongside with other global conditions.
Common Question: How do time options interact with night lights and their schedules?
Enabling time options is not required for using night lights and their schedules. If you want your automation to operate 24/7, itâs best to disable the main time condition and only use the night lights time condition.
-
Example of Correct Configuration:
- Main Time Condition: Disabled
- Night Lights Time: 10 pm to 7 am
In this setup, the automation will run continuously, and the night lights will activate from 10 pm to 7 am as specified.
-
Example of Correct Configuration:
- Main Time Condition: 6 pm to 7 am
- Night Lights Time: 10 pm to 7 am
In this setup, the automation will run only from 6 pm to 7 am, while the night lights will be active from 10 pm to 7 am as specified.
-
Example of Incorrect Configuration:
- Main Time Condition: 6 pm to 10 pm
- Night Lights Time: 10 pm to 7 am
Here, the automation will only run from 6 pm to 10 pm, making it impossible for the night lights to activate if their schedule starts after the automation period ends.
Understanding how these time options interact will help ensure your automation and night lights function as intended.
Start Time
The start of when the automation can run.
End Time
The end of when the automation canât run.
Note: Think of the start and end times as a race. The start time is like the âstarting line,â and the end time is the âfinish line.â The automation will only run during this time frame, just as a race occurs between the starting and finishing lines.
Weekdays
It will only work on the selected days. This is a good option if you have a different schedule for weekends using the same lights, or if your office is only open from Monday to Friday and you donât want the light coming ON Saturday or Sunday.
Night Lights - Start Time
The start of when the night lights can run. You donât need to âEnable the time optionsâ for this to work. The âNight Lights - Start Timeâ is enabled when you âEnable the night lights optionsâ.
Night Lights - End Time
The end of when the night lights canât run. You donât need to âEnable the time optionsâ for this to work. The âNight Lights - End Timeâ is enabled when you âEnable the night lights optionsâ.
Hope this gives you a better understand of the time settings.
Enjoy
Blacky
Back to FAQ: Click Here
Back to âThe Settings & Best Practice Guidelinesâ Click Here
Thank you again for yet another awesome update, your blueprints are always inspirational!
Loving this blueprint, before I get started with it Iâm wondering how the timer works for turning off. if I trigger with a contact and Motion sensor. Will the timer wait for both the motion and contact to turn off/closed? Basically is there a wait for both to be true then the timer starts?
@samuelthng Oh, I thought I fixed that. Thanks for letting me know. I will do an update.
Edit: I will also push out the next release early.
Hi @geox19, firstly welcome to the community.
Yes but some times you will need use a group helper. When using a contact sensor I would recommend you set up a group helper. It will then work for you. Here is a link to the FAQ on this Click Here
There was a bug in the by-pass of Version 2.9, thanks @samuelthng for letting us know.
Because this release is to fix this bug in version 2.9 that was release a day ago, if you are upgrading from version 2.8 and below please read the release notes of version 2.9 before upgrading as you will need to clean up a bit of code in the YAML. Click Here to see version 2.9 release notes.
I have also pushed out a new feature early .
New Features
- Trigger can now be an ON/OFF pulse in milliseconds. This can be useful if you trigger is fast reacting.
Bugs Fixes
-
Fixed a bug that lights could stay ON when crossing over from normal lights to night lights and from night lights to normal lights in a time trigger. Known issue, light could flicker when this happens. We will try and fix this in the next release.
-
Fixed a bug in by-pass.
Enjoy
Blacky
Thanks for your kind words. It is nice to hear you like them and just get a nice feedback
Hi! First of all, thanks for the great blueprint!
Got one question, after updating to 2023.4 my automation stopped working correctly. My lights are switching on after motion detected, but switching off instantly. So itâs like a flash only, updating to 3.0 didnât resolve the issue.
Iâm using Hue spots with SkyConnect + ZHA.
alias: Lampen hal en trap aan bij beweging
description: ""
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.bewegingssensoren
light_switch:
area_id:
- 50c5bc6b0d4211eb8cc7ef4b9dc9b663
- trap
light_brightness: 50
include_night_lights: night_lights_enabled
night_lights:
area_id:
- 50c5bc6b0d4211eb8cc7ef4b9dc9b663
- trap
night_time_delay: 2.5
end_scenes: []
include_light_control:
- use_brightness
- use_transition
include_night_light_control:
- use_brightness
- use_transition
night_light_brightness: 50
night_lights_after_time: "23:00:00"
night_lights_before_time: "06:30:00"
time_delay: 5
include_bypass: bypass_disabled
light_transition_on: 1.5
light_transition_off: 2
night_light_transition_on: 1.5
night_light_transition_off: 2
Any ideas? Thanks!
@Scott_NL
Hi Scott, thanks for your question, providing your YAML and welcome to the community.
We are on Home Assistant 2023.4.2. We have done a lot of testing with this update and it is all working perfectly here.
The blueprint must pass through the time delay before it will turn off your lights, so I would expect that something else could be the problem.
All your settings look ok. I have noticed you are using areaâs so maybe your turning on something else that is turning off your lights. Maybe try and expand your area down to entities (from orange to green colour) you would like to control by clicking on the expand â<>â of your area (see below).
Another thing you could do is, trigger the automation and straight after this happens have a look at your traces. You can find it in the top right next to the 3 dots in your automation called âTracesâ. Follow the orange line, it shouldnât be at the end as you have a 5 min or 2.5 min delay.
Once you confirm your traces, and know the automation is not turning off the lights maybe check your other automations or have a look at your logbook.
Just setup most of my lighting automations using this blueprint. What a time saver. Iâm coming from Hubitat and having to learn some of the ways to do things in Home Assistant can really eat up the time. This blueprint let me point and click my way to success. Thank you Blacky
Whereâs the donate link?
Thanks for the welcome and your detailed answer.
Apparently I put the hallway spots in a group and added it to the same area, so removing the group did the trick.
Thanks again and awesome timesaver for me.