Thx!
Didnât know they were combined by AND. Thought it was OR.
Hi,
Iâm currently using this blueprint with a sensor group with no issue.
Is there a way to use one sensor only to do not turn off the light when they are on, but not to turn them on when they are off? I have a camera that produces many false positive. Thanks!
UPDATE: I found a workaround. I created a dummy Boolean and then a dummy template binary sensor that replicates the state of the Boolean. Then I created an automation that turns on the Boolean if the camera detects motion, but only if the light is on.
Thanks so much for the yaml, but sadly the issue persists, and it was also a thing, when i used v6.0 (which was the latest version when i set it up).
Sometimes it just turns on, then instantly off, i canât really tell why
Hey Blacky, thanks again for your Blueprints! They are working fine in the hall and bathroom with a simple motion sensor. Iâm now trying to get the Living Room setup to work, which is a bit more complex. I used to have a Node-RED flow that just waits for the LUX values from my Hue light sensor that is behind a window. That was essentially my trigger. It looks like that canât be a trigger in this Blueprint, or am I missing something like a workaround for this? Thanks!
Hey, first of all thanks for the efforts in creating this awesome automation and the nice documentation!
I have a very similar problem as TheAutomator. Let me explain: in my living room, I want to use dynamic lighting. I also have a lux sensor. When I am in the living room for a real long time, and the lux sensor reading passes the lux thresholds set in the dynamic lighting tab, it wonât function as a trigger it seems. Only after I leave the room for the motion sensors to report âclearâ it will work after entering the room again. Since I already configure the necessary parameters in the dynamic lighting tab, I somehow assumed that this would function as a trigger, too. Maybe there is another way to achieve this? I tried adding the sun state to the trigger sensor, but this will also not work since then the lights would be on no matter what until the sun sets againâŚ
I am certain there is a solution to this, since I believe that this is a common use-case, but I wasnât able to figure it out alone unfortunately. I hope someone can help.
(Btw I really tried really hard to search this topic, but the search function is quite restrictive when it comes to search terms. Even the simplest terms would yield 0 results.)
Best,
Chris
First, youâll need to set up a trigger. Create a schedule helper that starts well before dark and ends at the time it is light. Example 4pm to 10am.
Once your trigger is set up, use the ambient settings to adjust your lights to 10%.
In night lights, use your motion sensor as the state condition and set the lights to 100%. Make sure in Night Light Control you select If lights are ON, adjust the lights when crossing over.
Or you can look at my Smart Light - Entity - Sun Elevation - Ambient & Time Triggers blueprint with the same set up but you just need to use the ambient as the trigger.
Having a delay OFF for your motion sensor will make it work better.
Blacky
You can also see this template example that too may help you click here but looks like you got it sorted.
Blacky
It might be worth trying to redo the automation from scratch, but I suggest that the issue may lie with one of the devices. When the problem occurs, check the trace line to see which trigger was activated. This can help you pinpoint the exact cause of the issue.
Blacky
The LUX value is a condition but it will trigger the automation if the trigger sensor is ON. Example, if a motion sensor is ON and lux is high the light will be OFF but if the lux sensor goes low then the light will come ON.
If you would like to trigger on lux values then take a look at my Smart Light - Entity - Sun Elevation - Ambient & Time Triggers blueprint. I use this with sun elevation but lux value is similar, it will turn the light ON when sun elevation goes below falling value you could use lux value and then a 11pm I have it turn the lights OFF but you could use the lux value to turn the light OFF. You can mix and match what you would like.
I not sure exactly what you are trying to do but hopefully it may point you in the right direction.
Blacky
Hi Chris,
Looks like you may have a brightness of 0%. If so you will need to create a helper and enter it into Dynamic Lighting - Toggle Helper. If you have done this already could you please 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.
Blacky
Thanks for a GREAT blueprint with a lot of time and effort invested in it!
Short question; if my light already are in the state âonâ and I donât wanât the autimation to run and then after 2 minutes turn the light off (when it from the beginning already was on), how do I achevie it in bypass section. I reallt donât get it
I think in this case it required to set any light to night mode of script. I will try explain more clear
Day script:
- trigger1
- light1
- night lights - empty
- Enable the night lights options - true, Enable entity state option - true. Add state for night mode
In this case when âNight stateâ is activated, script will be not working because no ânight lightsâ
Night script:
- trigger2
- lights - empty
- night lights - light1
- add same night settings as for day script
For this situation it required to add any light to second point of âNight scriptâ
If you would like to disable the automation so you can manually turn the light ON and OFF then click here for the FAQ on it.
Blacky
No thatâs not what I ment.
I mean if the light is on before the automation triggers, it should stay on
I have developed a template binary sensor for you so you can use 2 motion sensors and depending on your night mode entity state (ON / OFF) it will use day or night motion sensor . Then you can use one automation.
To create a Template binary sensor, follow these steps:
- Navigate to Settings > Device & Services > Helpers tab at the top.
- Click the Create helper button.
- Select Template and then choose Template a binary sensor.
Next, provide a Name that you like and Device class = motion. If applicable, you can link this template to an existing device so it appears under that deviceâs details but you probably wont do this.
In the State template field, add the code below, replacing input_boolean.night_mode with your entity ID used to activate night lights, binary_sensor.motion_sensor_for_night is the motion sensor entity ID used for night time and binary_sensor.motion_sensor_for_day is the motion sensor you would like to use during the day.
Once you create this template sensor use it in the blueprint trigger input. You then just set up one automation to do what you would like and the motion sensors will change depending on your âNight stateâ. Use the same input_boolean.night_mode entity ID in the Night Lights - Entity State
{% if is_state('input_boolean.night_mode', 'on') %}
{{ states('binary_sensor.motion_sensor_for_night') }}
{% else %}
{{ states('binary_sensor.motion_sensor_for_day') }}
{% endif %}
Hope this makes sense. If you are unsure could you provide us your YAML of the automation and your 2 motion sensor entity IDâs.
Let us know how you go.
Blacky
The issue is that the automation keeps triggering even if the light is already on. When the light is off, the automation triggers and turns it on. If it triggers again while the light is on, it resets the delay, and this cycle continues until no more triggers happen and the delay passes. The challenge is that you canât simply add a condition to check if the light is already on to stop the automation because of how the automation is structured.
I have a method that might help: If you manually turn the light on, it will activate a template binary sensor that can be used to bypass and disable the automation. However, if the automation turns the light on, the template sensor wonât activate, allowing the automation to continue running. Itâs not a perfect solution and has some limitations, but it might be what youâre looking for.
If this sounds useful and youâd like to know how to create the template binary sensor, just let me know, and Iâll provide the steps.
Blacky
Some of my lights are dimmers which support brightness. How can I achieve my use case?
Between 8pm and 5am Iâd like some lights to come on at 20% brightness. These lights are usually all off. Do I understand correctly that home assistant canât change the brightness while the light is off? How would I use this automation to accomplish this?
The only thing more amazing than this blueprint is the community support that drives it. Wow!
EDIT: I saw some other blueprints that had similar features. For my use case ^ I want it to be time driven in some cases and sun driven in others. Is this the right blueprint for me?
Hey Blacky, thank you so much for your time and support!
You are absolutely right, it is at 0% and I do not have a toggle helper. I read that actually, but from the description I couldnât figure out what it implies or means at the beginning, and after the automation worked well, I assumed it is optional-ishâŚ. When I noticed the problematic behaviour later I didnât assume it is really related to my problem, since it mentiones missing light entities etc (not a problem I have - for now at least). I now googled a bit, but I still donât have a clear image of what is required from me.
What is a toggle helper? Is it a HA concept or is it a term specific to this blueprint (I found something related in HA docs, but i cannot connect the dots)? What does it look like implementation-wise (is it a script, a boolean, another automation, a template,âŚ) and how should it behave so that I can achieve my goal?
I have some derived sensors for sunlight (based on elevation and Lux sensors in combination) that worked really well for my previous automations. I just registered it as additional trigger and condition, and it would work very well. If i click on the trigger helper input field in the blueprint, it gives me some switches I created, and the option to create a new one. If I create a new one, I end up with an input boolean. But this is not really what I had in mind - I donât want to switch it on manually (at least that is what it looks like), but I want the automation to trigger using the parameters in the dynamic lighting tab (e.g., sun below certain elevation or current lux readings below threshold). And i cannot use my old trigger here for that, which would be a binary sensor (on=sunlight, lights off, off=no sunlight, lights on; at least thats how i used it previously).
I feel like I am missing something which is very obvious for everybody else (sorry for that!), but I dont really understand what I am required to do. It reads that it is imprtant, that it is recommended and I need it, but not really how I can accomplish it.
Thanks again for the very kind and quick support, it is very much appreciated! That, and the awesome blueprint!
Sorry for the lengthy post, I just hoped it would help identifying where the error in my logic is.
Best,
Chris
Hi Chris,
I am all good with long post as it can give me a better understanding.
A toggle helper in Home Assistant is like a virtual switch that can be controlled manually or through automations. It helps track or trigger events in your smart home system. In our case, with dynamic lighting, we use a toggle helper to monitor whether an automation is still running, even when the light brightness is set to 0% (which effectively turns the light off). This way, the toggle helper provides a clear indication that the automation is active, even though the light is OFF.
In general, toggle helpers are useful for controlling or tracking any binary state in Home Assistant, like âon/offâ or âenabled/disabled.â You can use its state to control automations or any service that needs a switch to indicate whether something is running, whether itâs true or false. While toggle helpers can be used for a variety of purposes, I hope this gives you a better understanding of what they can do and how developers commonly use them.
Yes, you can create a Toggle Helper this way. While theyâre also referred to as Input Booleans, that term can sometimes be confusing for users who are new to HA or automations. Toggle Helper is a more intuitive name, and itâs what HA now calls it in the UI.
To create a toggle helper, follow these steps:
- Navigate to Settings > Devices & Services > Helpers (tab at the top).
- Click the Create helper button.
- Select Toggle.
- Enter a name for your toggle helper and choose an icon, if desired.
There are many types of helpers you can create in Home Assistant. By following steps 1 and 2, youâll see a variety of helper options to choose from. All the helpers you create can be managed in the same location, as outlined in step 1.
As already stated above, HA has added a recent feature to help streamline the process. Within the blueprint, during input selection, you can now create a new toggle helper directly by scrolling to the bottom of the list of entities and selecting Create a new Toggle Helper. This avoids the need to leave the blueprint editor. The toggle helper created this way is exactly the same as the one created via the steps above, making it easier to incorporate into your automations.
Once you create a toggle helper and add it to an automation, you donât need to manually turn it ON or OFF⌠the automation will handle that for you. If you add the toggle helper to a dashboard, youâll see it switch ON when the automation is running and OFF when itâs not.
Creating the toggle helper and selecting it in this input is all you need to do. Note that this toggle helper should be dedicated to this one automation only and shouldnât be used for anything else. If you create another automation, youâll need to create a new toggle helper specifically for that automation. You only need to create this toggle helper if the minimum brightness value is set to 0%.
Hope this helps you understand helpers and why we use them.
Blacky
Maximum ON Time even if Triggers do not clear?
I use door/window sensor in some scenarios, but sometimes the door isnât closed, so the light never turns off automatically. Is there an elegant way to turn off the lights even if the triggers never clear?