Thanks a bunch!!
I think you are right that the light has to go off rather than the trigger.
Thank you for all your help and the amazing blueprints
I am (or perhaps better said was) a Smartthings user for years, and I have become accustomed to their home management logic.
Home mode:
- At home
- outside the house
- Night
I had also added
- sleep children
In this way, when I activated that mode (either by voice, or at a certain time or with some automation) the house behaved differently. I had combined a scene with actions to do and the change of mode to “sleep children”, and all my home automations specified whether to be used in just one specific mode or more or all of them. This in Home assistant is a little more difficult (for me as I’m new) but I’m trying to maintain this logic, and by doing this I could simply make an automation that when the mode is “normal children” all the lights you want in the room come on way you want.
A little off topic but to conclude, this dual mode (automations that change the home mode, and home mode that can be changed manually without automations) allows me to adjust different home modes without triggering other automations when needed.
I hope I have given some useful food for thought, but I realize that doing it now with a whole system of scene rules and automations set up is quite a headache.
I don’t think my drop-down menu is usable because the bypass allows you to select a button, but not a drop-down menu, in fact it lets me select the menu, but then there is no way to indicate which mode has been chosen, so I can’t to use this project.
Thanks! This is a good idea to sort everything and keep an overview of what is happening when. Ill think about and how I can implement it
Blacky, sorry to bother you again, just want to double check.
Atm it seems that the night light option works for me (but maybe not as expected).
I changed from previously using Scenes to directly targeting the light groups.
As a result it seems my night light settings activate even without the bulbs going of or my presence sensor switching on and off.
However, after the night light timer ends, all lights turn of even though the the automation itself is supposed to be active for a few more hour after.
Any idea if I am missing something?
Otherwise my plan was to use your Light Addon to triigger a night light, however, the “Time Delay” for the lights to stay on can be set from 1 to 10 sec, any idea if I can increase this somehow?
This way I could use a time trigger to active the addon for night lights and pause the main automation untill the night light time passes by and the time trigger goes off.
If you have a input its much appreciated but otherwise don’t worry I will figure something out.
Thanks a bunch
I am assuming by drop-down menu, you meant to use a drop down helper entity as the bypass. I really love Blacky’s blueprint and would think it a shame if you gave it a miss for this - so here’s a write-up for you.
1. Using the bypass without a physical switch - according to FAQ:
According to Blacky’s original FAQ post with the title in quotes below, there are specific instructions to create a virtual switch for use with the bypass. If you want to use a dropdown menu, that’s also possible by creating a template helper that watches the dropdown entity’s value and returns a boolean value.
You might want to check out the FAQ for this question first:
Q: How to use the “Trigger Sensor By-pass” without having a physical switch?
2. Using the bypass with a dropdown helper and a template binary sensor
If you still want to use your dropdown helper, you can check out the instructions below.
Show/Hide Example: How to create a template binary sensor as proxy for a dropdown helper entity, for use with bypass.
-
Identify your dropdown helper entity’s ID:
My caseinput_select.test_dropdown
-
Copy the option you want to use as a bypass, if possible, set the dropdown to the option as well:
My case:Test Option 1
-
Return to the Helpers page, create a template helper:
-
Select
Template a binary sensor
-
Use the following state template, and fill in the name you want for the entity.
Please replace the entity ID and option with your own.{{ is_state('input_select.test_dropdown', 'Test Option 1') }}
-
If done correctly, you should see something like this:
-
Submit, check that changing your dropdown helper entity options correctly updates your new binary sensor.
-
Use your newly created template binary sensor as your bypass. It will work hand-in-hand with the dropdown to perform your bypass.
Below image is just an example, please configure as per your own requirements.
I have read your post but not 100% sure what you would like to do. If I am wrong in what I am saying could you post a step guide of what you would like and I will try to resolve / guide you.
This is what I think your would like.
Sensor light to work 24/7 but between 18:30 and 19:30 lights to be ON and stay ON for the hour at a lower brightness level.
Using this blueprint create 2 automations.
- Create an automation to run between from start 19:30 to end 18:30 using the time option then do any settings you like.
- Create another automation to run between from 18:30 to end 19:30 set the lower brightness levels you would like. If you would like the lights to be ON for the hour then set the time delay to 60 min (just type the value 60 into it and save). If you would like night lights to come on between 19:30 to end 8:00 and have different settings then just enable night lights and add those times into night lights (19:30 to 8:00) and set the main time from 18:30 to 8:00 in this automation and the first automation time would be start at 8:00 end at 18:30. Or you can use the first automation for night lights if you like as the time delay of 60 min in normal lights will run over your time and you could have lights on longer than needed. Just see what works for you.
That is it your done. Let me now if this works for you.
Blacky
I have some unexpected behavior, I think it is caused by the bypass but I fail at troubleshooting the conditions.
I updated to the latest version but behavior stays the same.
I expect the lights to turn on when motion is detected, but I also configured the bypass to keep lights in current state when a helper is on. But I think the lights stay in de same state after the helper turned off. When I toggle the helper it starts working again.
Hi Fred, I have tested it again here and it is working. There are 2 things that I can think of.
-
When you turn the by-pass OFF and no motion is detected and the light is ON it will stay ON for the set by-pass time delay as shown below. This could be throwing you to think it is not working. If you would like it to go OFF as soon as you turn the by-pass OFF and no motion is detected then you can set the bypass time delay to 0.
-
Sometimes when I update you have to do some things to clean up your YAML. You may have not updated for a while and missed this. If it is easy for you to do then you could try and delete the automation and recreate it. This will clean up your YAML and sometimes it is easer to do this and you can’t make any mistakes. If you would like to do it manually and do the work then you can look at the FAQ and down the bottom it list all the things that was needed to be done on the updates that required some work. You will have to know what version you were on and do all the items to the version you are on now.
Hope this helps you.
Blacky
I was on 4.7 and updated to 4.8 recently.
Will do some more testing.
Thanks!
That works indeed for me
Appreciate your efforts!
Then it should all be good. Let us know if you find anything (bug).
Thanks for your help
Blacky
This is a birthday release (28 October 2022) as it is just about a year ago when I posted this blueprint. To think I developed it because my daughter is a nurse and I kept forgetting to turn the light ON when she was on shift work. Now I use it all through out my home and I hope it has helped some people automate their lights. I like to thank you all for your positive feedback and your ideas… look forward to the next year. Hope you like this release, Blacky
New Feature
-
Dynamic Lighting Option
This will constantly adjust your lighting brightness % to a floating lux value. Example; When it gets darker your brightness will increase and as it gets lighter your brightness will decrease
-
Ambient Options - Low and High Values
This now allows your to set a low and high lux value. This will help when it is a cloudy day and your light turns ON, or when your sensor is close to your setting. It gives you the ability to set a “dead zone” to prevent your lights turning ON and OFF repeatedly. The low value will turn your lights ON and the high value will turn your lights OFF
If you are using ambient options then please make sure you reset your low and High settings. The low setting is what you initially had before this update. If you would like it to work the same before this update then set your high value the same as your low value.
If you like this blueprint? Consider hitting the button in the top post
If you like my blueprints, and would like to show your support or just say thank you? Click Here
Enjoy
Blacky
@Blacky in would be nice have a inverse option for adaptive lighting (but for time). ie at sunset say 18:00 i nromally use 10% in my landing / stairs, but late a night when going to bed ( some memebr go really late about 2am) it would be nice to have option to set the brightness level for various times. so i could set brightness for 2am to 2% just enough to light stairs / landing. if you understand what i mean.
maybe call it “night light” and allow a brightness and time to be set, so it uses that brightness after the night light time is set.
I don’t use adaptive lighting so I am not sure of this.
You can use the sun condition for your 10% and that will be normal lights. Then enable night lights and set it to 2am to say 4am (whatever you like) and set it to 2%.
We have night lights already.
If you are looking to turn ON and OFF lights at a particular time then you could use my Turn Light, Switch or Scene On & Off with Trigger Conditions blueprint. Or you can use a schedule as the trigger to keep the light ON.
If you are looking to use have motion sensor then you can set the times in the global condition and night lights
EDIT: I think I am getting confused / not understanding the question.
oh, great, it has been a while since i edited my automation, i’ll take a look thanks.
For some reason this automation loves to turn off my under cabinet LED lights right after it successfully turns them on. I have cieling lights also triggering that don’t have this issue (they turn on and stay on just like they are supposed to). Any idea what makes these cabinet lights have an issue?
Here is my yaml config:
id: '1695347383668'
alias: Kitchen - Lights Auto
description: ''
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.kitchen_presence_occupancy
include_light_control:
- use_brightness
- use_transition
light_brightness: 80
include_ambient: ambient_enabled
ambient_light_sensor: sensor.great_room_lux
ambient_light_value: 70
include_night_lights: night_lights_enabled
light_switch:
entity_id:
- light.kitchen_ceiling_lights
- light.kitchen_breakfast_nook_ceiling_lights
- light.kitchen_cabinet_led_group
night_lights:
entity_id:
- light.kitchen_ceiling_lights
- light.kitchen_breakfast_nook_ceiling_lights
- light.kitchen_cabinet_led_group
night_time_delay: 2
include_night_light_control:
- use_brightness
- use_transition
night_lights_conditions:
- time_enabled
night_lights_after_time: '23:00:00'
night_lights_before_time: '07:30:00'
I would say it is your ambient light settings.
You have min set to 70 and if you are on the latest V4.9 you have a max of 80. So when your light turn on your lux goes above 80 and turn it off.
You have 2 options.
- Tick YES in site conditions. It will then not consider max lux.
- Tick NO in site conditions. Adjust your max lux higher to give you a “Dead Zone”. This was the reason I added max lux in the latest release, to stop this. Set the max to say 400 lux and when your light goes ON see what the lux value is then you can adjust max to a setting you like.
Strange thing is the 8 min. I think you have time delay set to 5. If the above is not the problem, adjust the time delay to 6 min, click save and then back to 5 min, click save. In fact now I have read your trace again… is something else turning OFF your light group? This looks strange.
Let us know how you go.
Blacky
I’m on v4.7 still, so the ambient shouldn’t be an issue. The time delay makes sense to me since I was in the room for 3ish minutes and then the 5minutes was no activity. I can’t find anything that would be shutting off this light group. Is there another spot in the logs I can investigate? Most of the time it works perfectly. Seems like every couple days it gets like “out of sync” and this light group flips on/off quickly.
@Nomar383 That is the strange thing as you can see above and below we turn ON and OFF all light domains together. If you can have a look in your logbook to see what turned that light group OFF. Lucky you have the time stamp in the image above so it will be easy to find it by using the filter in the logbook. If you find it can you let us know.