Does anybody have any best practice for using this awesome blueprint with Adaptive Lighting?
Thanks so much for all your work again Blacky. Iâm having a little bit of trouble with the lux sensor? I have it set to âmy lights donât effect my sensorâ and at a level of 37 lux. They turn on just fine with presence, but they never turn off, even when lux is back up over 80. Any thoughts why this might be?
Hi Chris
Your welcome
I have just tested it again here and it worked perfectly. Below are my selections.
I have to ask even if I know the answer sorry. Are you using the correct lux sensor?
You can try 2 things.
- Redo the automation just encase something went wrong.
- 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.
I then can have a look at it.
FAQ - Night Lights - Entity State
This option allows you to use an entity to activate your night lights. You can use this option in your automation to activate your whole house into a night mode. Example of entities or use cases are;
- Alarm system - Some type of sleep or night mode.
- Turning your mobile phone on âDo Not Disturbâ when you go to bed.
- A helper toggle.
- A switch near your bed.
- A bed sensor.
- Etc
When the entity is in the ON state, night lights will be activated. When the entity is in the OFF state, the night lights will be deactivated.
Note: If you are using other conditions, then they must be met too.
iPhone Set Up - Do Not Disturb
Things change and your iPhone may be different, but hopefully this will help some.
If you would like to use âDo Not Disturbâ on your phone then you must turn this feature ON and have the Home Assistant App installed on your phone.
Then you will need to go into your phone settings and under âHome Assistantâ you will need to turn this on. For an iPhone it is called âFocusâ as shown below.
You will the need to turn this feature ON in focus. To do this swipe up or down and you will see something like this.
When you tap/hold/push on focus more options will appear.Then if you tap on the 3 dots you will see settings.
You will then need to turn ON focus status.
Once turned on go back and you will see an area with âAllowed Notificationsâ. You do not need to allow anything for Home Assistant to see if focus is turned ON or OFF.
You then can go into Home Assistant and in settings / devices & services / mobile app / your mobile phone device you will see the state change when you turn it ON and OFF with your phone. This will confirm that HA is receiving your focus status. You then add this entity into the automation under âNight Lights - Entity Stateâ as shown below.
Enjoy
Blacky
Back to FAQ: Click Here
Back to âThe Settings & Best Practice Guidelinesâ Click Here
Hi @Blacky. Thanks for your contributions. I am looking to switching to your blueprint and am wondering if youâre considering adding support for adding user customizable conditions that would determine whether an automation runs or not. I have a few helper toggles that allow me to easily turn my light automations off for the whole home, per floor, etc. So, my light automations always check that various toggles are âenabledâ before proceeding. A kill switch of sorts.
I was thinking the newly added condition selector could work great here: Selectors - Home Assistant (home-assistant.io)
Thanks!
Hi Dima
No problem.
This can be done with the by-pass already + more
I had a look at it today, but unfortunately I had to roll back as there was a bug in the release for me. Hope they fix it.
When I add a condition I make sure it works through the whole blueprint. Example;
By-pass (helper toggles or a kill switch): If you just added a condition it would prevent it from running. I have made sure it will do more. You have options when you turn the bypass ON and when you turn it OFF it analyse your automation and reacts correctly. So The bypass will prevent the automation running but let say you would like to turn on a helper (bypass / kill switch) and if any light are ON turn them OFF too. This will do that. But the other light you would like ON, no problem. What happen when you come home and your motion group is ON and you turn the bypass OFF. This will check that and turn your lights ON if required.
Sun: If you put a condition it would prevent it from running. I have made it analyse your automation and it reacts correctly.
Ambient: If you put a condition it would prevent it from running. I have made it analyse your automation and it reacts correctly. You also have more options.
A new one is coming out in the next release that I realy like. I have more on the road map to.
So the conditions in this blueprint do more that just prevent it from running. It all works together to analyse your automation with a simple click. You can use none of them or all of them. Code goes through the whole blueprint for this to happen. Condition selector will not do this.
The condition selector could be added and would say it probably will. If I add it now everyone would have to have the latest HA, and I donât have it yet.
If you find that you cant do something let us know as I do add a lot of suggestions.
PS: I also added a sensor light add on blueprint. For anyone else reading this, a bug was fixed so check it out and update. It links to this automation so you can have, movie lights, smoke detector light, alarm lights. Be sure to check this out.
Thanks Blacky, my settings look to me to be the same as yours, but I cover the sensor, lux goes to 1 and the lights turn on, I uncover the sensor, lux goes to 87 but the lights just stay on. Is this expected?
Here is my yaml
alias: Living Sensor Lights
description: ""
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.anyone_home_sensor
light_switch:
area_id: dining_room
entity_id:
- light.dining_table_light
- light.dining_wall_light
include_ambient: ambient_enabled
ambient_light_options: ambient_light_option_disabled
ambient_light_value: 37
include_time: time_disabled
after_time: "10:30:00"
before_time: "23:00:00"
include_sun: sun_disabled
include_zone: zone_enabled
zone: zone.home
night_light_transition_on: 4
night_light_colour_temperature: 4500
include_bypass: bypass_enabled
motion_bypass: input_boolean.bedtime
ambient_light_sensor: sensor.living_room_lux_illuminance
Iâm about a week into being a HA user - and absolutely loving this blueprint. Iâm hoping someone can point me in the right direction on this situation:
I have a door sensor, and a motion sensor in a hallway outside the door. The door is always closed (except for passage), together they should allow me to infer which direction someone is traveling. Aka - turn lights on in bedroom if motion sensor triggers then door sensor triggers, or turn lights on in hallway if door sensor triggers then motion sensor triggers.
I think I understand enough about automations that I could create this automation as a standalone, but I specifically like ALL the options already in this blueprint. So is there an easy way to create something this blueprint would still recognize as a âbinary sensorâ that is based off the sequential order of two other sensors?
Iâve created groups for other applications already, but that doesnât have the sequential nature. I also understand I can add lots of options to my own custom automation triggers, but I donât understand how to make those then report as a binary sensor for this blueprint to read.
As with most things HA Iâve encountered so far, I am guessing this is much easier than I am making it out to be, and I just need a little help getting pointed in the right direction. Thanks!
Hi Chris
Thanks for providing your YAML it makes it easier to resolve.
I will jump to the problem and then answer your question.
In âLights - Switches - Scenesâ you have entered in a âAreaâ called âdining roomâ. We canât use areas or devices and it must only be entities. I am amusing that your lights âdining_table_lightâ and âdinning_wall_lightâ are the only lights you would like to control. If so remove your area âdining roomâ from the automation and you will be good to go.
In the âThe Settings & Best Practice Guidelinesâ Click Here see under âLights - Switches - Scenesâ for a better explanation on this.
No, but a few things are also considered in the automation for this condition and option selection
If your trigger is ON then this happens. If you cover the sensor and it crosses over your setting (high to low) then the light will turn ON and your trigger is active. If you then remove the cover from the sensor and it crosses over your setting (low to high) the light will turn OFF after your âTime Delayâ setting.and trigger is disabled.
If the trigger is OFF the light will not turn ON if the sensor goes from (high to Low) and from (low to High) it just allow the trigger to be active when it is below your setting so the lights can turn ON if triggered.
If the trigger is ON and you cover the sensor and it crosses over your setting (high to low) then the light will turn ON. If the trigger then goes OFF it starts the time delay from that point. If you then remove the cover from the sensor and it crosses over your setting (low to high) and the light is still ON the light will still turn OFF and your trigger is disabled.
There are more scenarios but I think you get the idea. There are so many to consider in this automation and this is just one option with a few scenarios .
Idea is you just donât notice anything behind the automation and it just works
Let us know if this solves your automation.
Firstly welcome to the community.
I understand what your trying to do but running through some scenarios in my head.
Scenario 1 - Motion sensor in the Hallway
- When motion is detected, hall light turn ON - Done
- If you are in bedroom and you walk out into hallway motion detected hall light ON - Done
- If you are in hall way entering bedroom motion detected hall light ON - Done.
All option covered with just motion. Light turns OFF when motion is not detected.
Scenario 2 - Bedroom Door sensor.
- In hallway enter bedroom (door sensor), bedroom light ON - Done
- In bedroom enter hall open door bedroom light ON, but it should be ON already as you could be in the dark - Not Done
Questions:
- What turns it OFF?
- Do you leave the door open when you would like the light ON and then close it to turn the light OFF? If so then that would work
Scenario 3 - Bedroom Door sensor. If the door is the trigger then it just works of a time delay. Door is open and closed.
- In hallway enter bedroom (door sensor), bedroom light ON after some time light OFF - Done
- In bedroom enter hall open door bedroom light ONâŚ, but it should be ON already as you could be in the dark, so you have manually turned the light ON already, ok. so we leave bedroom close the door light is ON after some time light OFF - Done
This seems to work but only for a short time
Scenario 2 & 3 seams unresolved Would a motion sensor be better for a bedroom (Room) as door sensors work well for cupboards or small rooms like food storage, clothes rooms etc.
Maybe I donât fully understand what you are trying to do in its entirety.
Blacky
Is this saying that I would have to leave the room (presence clear) before the lights would turn off? I have a main room that can be used all day. What I would like is that in the morning when it is still dark the lights will turn on, but as the sun rises (and the lux value goes low->high) the lights would turn off, even though Iâm still in the room. Is that the intended behaviour? I removed the room from the lights, they still turn on when lux goes high->low, but as long as Iâm in the room they just stay on forever.
The should go off
can you give me your YAML now.
Of course, hereâs the one where it would not turn off when the lux went low->high with presence
alias: Living Sensor Lights
description: ""
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.anyone_home_sensor
light_switch:
entity_id:
- light.dining_table_light
- light.dining_wall_light
include_ambient: ambient_enabled
ambient_light_options: ambient_light_option_disabled
ambient_light_value: 37
include_time: time_disabled
after_time: "10:30:00"
before_time: "23:00:00"
include_sun: sun_disabled
include_zone: zone_enabled
zone: zone.home
night_light_transition_on: 4
night_light_colour_temperature: 4500
include_bypass: bypass_enabled
motion_bypass: input_boolean.disable_sensor_lights
ambient_light_sensor: sensor.living_room_lux_illuminance
Can you set a delay time and save. Default is 5 min so can you set it to 1 and test it then you can go back to 5 and test it. Thanks.
New Features
Added the ability to use another condition in night lights called âEntity Stateâ . Night lights have 3 conditions now.
- Entity State
- Time
- Sun Elevation
The entity must have an ON state to activate nigh lights. So now you can use âDo Not Disturbâ on your phone, a helper toggle, a switch near your bed, a bed sensor etc to activate night lights. More information can be found in our FAQ or Click Here for more information.
Bugs Fixes
- Fixed an error when transition was disabled like shown below. This was probably when you are using zigbee2mqtt.
Transition value 0 is not valid.
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
Thanks for that awesome work and constantly improving this blueprint!
Just a minor thing i want to point out there is a typo in the change log date of V4.3.
No problem, there was a lot of work (code changes) in this release.
All fixed
Thats great to hear, i faced issues with the combination of yeelight and nightlight functionality previously. Let me check tonight if this is gone now. If not iâll come back and post my logs.
awesome!
Bugs Fixes
- Fixed an bug in crossover transition from ânight light to normal lightsâ and from ânormal light to night lightsâ using wrong transition selection.
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