Hi,
Iām trying to achieve a very specific logic and Iām not sure if itās possible with the current version of the blueprint.
Here is the behavior I want:
The light should turn ON only if both my occupancy sensor and my motion sensor are ON.
If the motion sensor turns OFF but the occupancy sensor stays ON, the light should remain ON.
The light should turn OFF only when the occupancy sensor goes OFF.
So the occupancy sensor is the āmasterā, but motion is required to initially trigger the light.
Since I couldnāt find a way to do this directly in the blueprint, I built a workaround:
Created an input_boolean to store the combined state (ālatchedā ON until occupancy is OFF).
Created two automations to manage this logic.
Created a template binary_sensor linked to the input_boolean, because the blueprint only accepts binary sensors.
Used this template binary sensor as the motion trigger inside the blueprint.
It works, but it feels like an overcomplicated setup (āa bit of a factoryā), just to achieve a simple conditional ON + latched behavior.
My questions are:
Is there a simpler way to do this directly in the blueprint that I might have missed?
If not, is this kind of combined/conditional trigger logic something that could be added as a feature in a future version?
Thanks a lot for your work, this blueprint is great and adding this flexibility would make it even better!
Before I get into detail I think this will be the best and easiest way.
Group your sensors: If any sensor is ON the group is ON. We use this when we have a device that provides motion and an occupancy sensor. The reason being is motion is fast to detect motion and occupancy is better for keeping it ON. Once you leave the room both should go OFF and then the time delay starts.
I did consider grouping the sensors, but unfortunately it doesnāt solve my issue.
The problem is that my occupancy sensor sometimes produces false positives. The bathroom door is located in a hallway, and when someone walks close to it, the occupancy sensor occasionally switches to ON even though nobody is actually entering the bathroom.
I have already tried everything I could to reduce these unwanted triggers, but they still happen from time to time.
Because of this, I really need a strict AND condition:
the light should only turn ON when both occupancy and motion are ON at the same time. But stay ON if one of them are ON.
Okay. I am getting two scenarios and I not sure what one you would like.
Ether option you will create a template binary sensor helper and use it as the trigger only.
Go to Settings > Devices & Services > Helpers.
Click ā+ Create Helperā and choose Template > Binary sensor.
Set a Name for your new binary sensor.
In the State template field, paste the code below.
Replace input_boolean.occupancy with the actual entity ID or your occupancy sensor.
Replace input_boolean.motion with the actual entity ID or your motion sensor.
Tricky Part: Save it to get the entity ID of this helper. Then use that ID and replace binary_sensor.this_helper_id with the actual entity ID or this helper.
First one
This will turn ON when both are ON and only turn OFF when the occupancy sensor goes OFF.
It is a trick one as you have to reference the helper ID and you must create it first.
{% set occ = is_state('input_boolean.occupancy', 'on') %}
{% set mot = is_state('input_boolean.motion', 'on') %}
{% set helper = is_state('binary_sensor.this_helper_id', 'on') %}
{% if not occ %}
off
{% elif occ and mot %}
on
{% elif occ and helper %}
on
{% else %}
off
{% endif %}
Second One
Turn ON when occupancy and motion are ON but only turn OFF if both occupancy and motion are OFF.
Same as above tricky as you have to reference the helper ID and you must create it first.
{% set occ = is_state('input_boolean.occupancy', 'on') %}
{% set mot = is_state('input_boolean.motion', 'on') %}
{% set helper = is_state('binary_sensor.this_helper_id', 'on') %}
{% if occ and mot %}
on
{% elif helper and occ or mot %}
on
{% else %}
off
{% endif %}
Hi
Fiirst of all, thanks for this blueprint !
Iāve got one question.
When switching from Night mode (letās say with lights in blue) to Day mode, when lights are already on, they donāt return back to the color (white) defined as per the day mode. Is there a way to force the lights take the settings from day mode when the night mode is disabled (or enabled) ?
Thanks
No, that is exactly what I was asking.
I was not expecting it to be nested, I was looking for it in the top level.
I just set it up, letās see how it goes.
Yes, in Night Light Control under Night Lights - Light Control Options select If lights are ON, adjust the lights when crossing over and you be all good.
First of all appreciate your work and sharing with the community! I have configured the automation for all my hue sensors and it works very well!
I have 2 feature requests hope you can consider:
For ambient light settings would be nice to allow to define the light is above or below threshold for XX minutes. In cloudy days my hue sensor is too sensitive and it just turns the light on and off all the time, and this can hopefully help with the situation (I already have a big gap for my high and low threshold)
One thing I like with Hue motion automation is that it dims the light for 1 minute to remind the user light is about to turn off before it actually turns off the light. This could potentially be useful in some scenarios.
Hope you can consider the feature requests, have a great day!
Iāve just discovered this incredible blueprint and am starting to work it into existence in my setup. After reading through the FAQ and enough posts to make my eyes go crossed, wanted to see if I could clarify a few of my understandings so I can get this right.
For the setup, Iāll be using it to control LED strip under cabinet lighting driven by a WLED controller and based on a PIR motion sensor (possibly combined with the lux sensor in it). Might go Presence Sensor later, but to start.
Since itās WLED and an RGBWWC strip (single zone, not IC), I set 3 Presets for the different colors and brightness depending on time of day (or light level). My understanding from reading is the way to use presets is to set them as scenes and call from the blueprint automation. But what Iām curious about is would there be anything gained from retrieving the RGBW values from my presets and just putting them in the blueprint vs calling scenes? Still pretty new to HA, so wasnāt sure if there would be any performance to be gained by that.
My second question is around triggering the different presets based on the parameters. Would each scenario Iām using be a separate automation, or can it be included in one? Letās say just using time of day as an easy start. If I want a certain preset to call by time of day (so late night itās my low glow preset which is a nice Indiglo shade on very low power), do I make a separate automation for each time block, or am I missing a way to define that within the blueprint automation?
In a perfect world, Iāll use light levels and have the power and color/temp of the LEDs base on that, but while Iām still learning things, will probably start with time of day.
Thanks so much, Ben, for your generous donation. I truly appreciate it. It means a lot to know that the time and effort put into this blueprint is valued. We all invest in different lights and devices, but without good automations theyāre really just simple switches. Thank you again for your support⦠it genuinely motivates me to keep improving my work.
First question
For me I like to use entities and set the RGBW (my led lights with WLED). If all your lights are the same colour and brightness then I would use RGBWW with brightness. If you have lights at are all different colours and brightness then scenes are the way to go. Using entities with the light control works so much better and allows you to use all the options.
Second question
In this blueprint you have Lights (AKA normal lights) and night lights. In night lights you also have a glow light (lights stay ON when night lights are active). What you can do is set up your normal lights you would like during the day. Then enable night lights using the night lights time option. Then set up your night lights for the lower brightness. If you have or want a glow light when night lights are active then enable this option and set up your glow lights. Try using entities first and set all your brightness and colours within the blueprint. One option to select is in Night Lights - Light Control Options and enable If lights are ON, adjust the lights when crossing over.
I use WLED and HA has WLED in the open home foundation now. Maybe I should look at an option to use WLED presets
Your lighting experience, your way ā take control and customize it to perfection!
New Features
This has been a very popular feature request, and now itās here!
Dim Before OFF Option
This option allows you to dim the lights as a visual warning before they turn OFF. It gives you time to trigger the motion sensor if you want the lights to stay ON.
You can find this new option in Light Control and in Night Light Control.
Ambient - Lux Time Delay
You now have an option to use a Low & High Lux Time Delay.
Low: Set how long the ambient light level must remain below the Low Lux Value before the condition is met. This helps prevent the lights from turning ON due to brief dips in lux.
High: Set how long the ambient light level must remain above the High Lux Value before the ambient condition is met. This helps prevent the lights from turning OFF due to brief spikes in lux.
Bug Fixes
Bug in night glow when not using transition and using different lights. Light that where different would stay ON or not turn OFF.
Maintenance
Cleaned up the bypass auto OFF conditions.
Some descriptions update.
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
Thanks @Blacky - that seems to do the trick, though sometimes itās not working - light goes off despite thecroom being occupied. I actually had on my old system a logic that compared the times when the motion sensor was triggered vs the door sensor. This was fool proof and didnāt require me to set a timer. Do you think this would work in HA as well?