DariusM73
(Darius M73)
April 10, 2025, 6:14pm
3389
Blacky:
@DariusM73
Sorry for confusion, let me try again:
I have indoor ambient lights, which get activated with a light sensor, but only, if we are at home. If not, the lights get activated, once we approach home, only if it’s dark (light sensor). The ambient light is on 10% - and if there is a motion detected, the lights light up to 100% for 2min, then should return to 10%.
Then, when we go sleeping, a sleep helper changes from awake to sleep, and all the lights go off. if there is a motion in the night, lights get activated on 5%, then go off (night=dark + sleep helper). in the morning, the sleep helper goes to awake and the ambient light gets triggered with 10%, if it’s still dark… the lights finally go off, when the light sensor says it’s bright. Additional: in the morning and evening the color of the lights is different.
Hope now it’s more clear… I would need some initial advises how to set it up, I’m afraid the combination of sensor BP, smart BP, helpers, templates … is too much for a newbie…
Now I understand what you’re trying to do. We’re going to flip the logic a bit, so don’t worry too much about the terms Lights and Night Lights … just focus on the setup.
Step 1: Create a Template Binary Sensor
Before we begin, ensure your device tracker is already set up. Now, follow these steps to create a Template Binary Sensor to track when no one is home:
Go to Settings > Devices & Services > Helpers (top tab).
Click Create Helper .
Select Template , then choose Template Binary Sensor .
Provide a Name and select a Device Class (optional).
(Optional) Link this sensor to an existing device for better organization.
In the State template field, enter one of the following codes:
State Templates
You will have to choose the one that suits you the best.
{{ states.device_tracker | selectattr('state', 'eq', 'home') | list | count == 0 }}
{{ state_attr('zone.home', 'persons') | list | length == 0 }}
All specified persons away
{{ state_attr('zone.home', 'persons') | list | select('in', ['person.one_here', 'person.two_here']) | list | count == 0 }}
Step 2: Configure the Sensor Light Blueprint
Once your binary sensor is created, use these settings in your Sensor Light Blueprint :
Trigger: Your motion sensor .
Lights: Add your lights, set a delay , and under Light Control , set brightness to 5% , then choose a transition and colour (for sleep mode).
Bypass: Enable option 2 and enter in your Template Binary Sensor for tracking if your home or not.
Ambient Light: Enable and configure to your preference but make sure NO - My Ambient Light Sensor is not affected by the Lights is selected.
Night Lights Settings: Enable it, use the State Condition and enter your sleep helper (Note: Sleep helper must be OFF when sleeping, ON when awake).
Night Lights Add your lights and set a 2 minute delay .
Night Light Control , set brightness to 100% and choose a colour. make sure you also Enable “If lights are ON, adjust when crossing over.”
Glow Lights: Enable it and configure them, set brightness to 10% and choose a colour. (This is for when you arrive home)
In the morning and evening, the light colour will remain the same, but Dynamic Lighting (colour temperature adjustment) will handle that.
For now, set this up and test it… I haven’t run it myself… all in my head, but this is the general approach. Once it’s working, you can explore Dynamic Lighting further.
Let us know how you go.
Blacky
Hi Blacky,
the “flipped” logic works fine as you suggested - there is only one issue: when I use Glow Lights and Night Lights there is no Dynamic Lighting available. That refers to the ambient light and the motion lights, where dynamic lighting brings a real value… Is there any technical reason not to allow dynamic lighting in the configuration? Could you potentially add this option? Br Darius