Another suggestion: I have the Aqara FP2 and it sends lux readings instantly in response to even tiny light level changes. It would be super helpful if the blueprint had an optional “lux level active for” setting so I could say just evaluate lux readings every 15 (or whatever) minutes. I’ve had occasions where the lux level fluctuates near the threshold so lights go off and on in close succession. In my “manual” automation I had a 15 minute delay if the lux level was above or below the threshold.
💡 Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time - Light Control - Device Tracker - Night Lights
Good idea. Just did that.
I’m a bit confused about the bypass. My situation is I have a lux controlled set of lights, and if I manually turn them off (via my streamdeck), they come back on. Or if I use Apple Home and turn them off, they come back on. How do I set it up so that I can manually turn them on or off?
I haven’t done it yet thanks for the reminder
Have a look at the setting under “Ambient Light Sensor - Site Conditions” and try using “YES - My Ambient Light Sensor is affected by the Lights”. I think this is what will help you. Let us know how you go.
You have to set up a by-pass (it is in the links below) If you would like manual control of your lights you will need to turn ON the by-pass, then your lights will be totally manual control and the automation will do nothing. There are also some additional options for the bypass and just select the options that suits you.
Have a read of;
“The Settings & Best Practice Guidelines” Click Here
The FAQ questions Click Here
If you have any other question please do ask
The bypass feature isn’t quite what I’m looking for, although I do see the value for some people. I’m not looking to entirely stop the automation until I manually tell the automation to resume at some later time.
I control my lights via Homekit, Stream Deck, HA dashboard and physical switch. I have two automations using your blueprint setup. One uses Lux control and the other does not. The non-Lux control automation works as expected. If the automation turned on the lights (due to time of day) and I manually turn them off (via homekit, stream deck, etc.) they stay off. Works as expected and no need for the ‘bypass’ option. If I leave the room and come back the lights turn on, if the conditions are met. Easy peasy.
However, for the lux control automation if it’s cloudy and the automation has the lights on and I manually turn them off, they come right back on. Not cool.
Here’s, IMHO, a more intuitive workflow for my situation using the lux threshold:
If the lights are turned on due to lux level (and presence), and I manually turn OFF the lights (via any of the 4 methods), the automation should NOT do ANYTHING to the lights until the next absence/presence detection event. The next time the automation is triggered and the conditions are met, then the lights can be turned on.
I don’t want a permanent bypass switch/entity that would allow me to stop the automation over multiple absence/presence sessions. I just want to over-ride the ‘lights on’ command for lux threshold during the current presence ‘session’. Leave the room and come back? Yup, turn the lights on.
Given the current behavior I think a setting in the “lux” section would be helpful. Call it something like:
Allow manual control to turn off lights during current presence session: Yes/No
If I select Yes, then during the current presence session the lights will stay off if I turn them off. Re-enter the room? Yup, they come back on like normal.
I use it all the time and is required for the future in the road map ahead.
This happens as it works for your other automation but you have chosen lux then it thinks deferentially. This is what happens with Lux; Imagine sitting in your office, as the light dims the lux value passes over your setting and most importantly presence is detected, you would like the lights to come on right so you don’t sit in the dark. This is how it works. Without seeing your traces I would say this is what is happening to you every time you turn it OFF. Once your turn the light off the automation is ready to receive a lux value so the above can happen. If we disabled this, then when it goes dark you would have to walk out of your office to clear the presence sensor and then walk back into the room for the light to turn ON, now that is not cool.
I think what we need to look at is the lux readings. You have said in the past, that the Aqara FP2 is fast reacting. Sometimes that is not a good thing.
Have a look in you Aqara FP2 settings. I don’t have one so I can’t advise you on this. There could be some settings in regards to LUX and how it reports. Maybe you need to contact Aqara and ask them. Failing that the good news is we are using Home Assistant and we can create a template sensor do do what we want. You could create a template sensor to look at your Aqara LUX readings and decide what you would like to do. Example;
Give me the average over X amount of time.
Give me the lowest reading over X amount of time.
You get the idea.
So maybe consider looking at your LUX and your Aqara FP2.
Hope this helps you
I understand, but maybe I didn’t clearly explain the problem. I’m not asking to change the default behavior of your blueprint. I totally understand why it acts the way it does. Make sense. However, my use case is that:
I’m sitting in my office (presence detected) and the lights have been on for some time due to lux value.
For whatever reason during my current “presence” session I want to MANUALLY turn off the lux controlled lights. I turn them off via my StreamDeck. They immediately come back on. Super un-cool.
What should happen is that if Lux control has my lights ON, and a enable the theoretical option I suggested of “Allow manual off for current presence session” in the Lux section, then if I turn OFF the lights via streamdeck they STAY off until I leave and re-enter the room (or manually turn them on via the streamdeck).
And now that you mention it, having a ‘smoothing’ type option for FP2 Lux values would be good. The Aqara app has no concept of modifying how Lux values are sent. They are sent instantly the light level changes. So adding an option something like: Lux level crosses threshold for xx minutes" would be most useful.
In essence your current bypass is “permanent” until a human toggles the binary sensor to re-enable the automation. I’m asking for a similar feature except that it’s scoped to the ‘current presence session’ . And via any programatic or manual wall switch it respects those state changes while I’m in the room. The ‘override’ is then reset upon leaving and re-entering the room.
This is done by you creating a template sensor. Once you have created it then enter this sensor into the automation.
The easiest way to do this is to use the by-pass.
Once you have created a by-pass make an easy automation that will turn OFF the by-pass when you presence goes to OFF state. If your not sure how to do this I can walk you through it.
In your by-pass set up, select “Enable the By-pass - If lights are ON, turn lights OFF” and have the “By-pass Time Delay” set to “0”. So if you are in the room, and you would like the lights OFF, you then would turn ON the by-pass (with your StreamDeck if you like) and your lights will turn OFF. You then have full manual control over you lights. When you walk out of the room your presence goes to an OFF state and turns the by-pass OFF for you (no human required). When you walk back into the room your lights function as normal.
Hope this works for you.
If you wouldn’t mind, that would be awesome! I looked through the Helpers and didn’t see a “template” sensor jump out at me. Still relatively new to HA.
Sorry for being dense…one clarifying question. For the Blueprint bypass don’t I need a dedicated binary sensor to use? So a net-new entity that just turns on bypass mode? Because I want a manual off via several means (Homekit, wall switch, streamdeck, HA dashboard), I can’t use a dedicated entity as I don’t think that works for all 4 control methods. I just want to, for example, tap the light in Homekit to turn it off and it stays off.
No, follow the steps in the FAQ on how to add a by-pass.
When you create a by-pass as explained in the FAQ it will create a new entity.
If you can add the new HA entity to Homekit & streamdeck then yes (I don’t use them). HA dashboard is explained in the FAQ. Wall switch you will have to add another one and if you do then you would use this as your by-pass entity and not follow the FAQ.
If you control something (light) in a automation and you would also like it to do something else with the light to control something else depending on what your thinking at the time is not good.
The by-pass is a good way and it is there now for you to use.
That’s the rub. That doesn’t work with my situation. I must be able to ‘bypass’ without creating any new entities that I need to expose to HomeKit or Streamdeck. The bypass must only use existing light accesories in Homekit and Streamdesk.
I think the whole bypass configuration is way too complicated and confusing for my situation. I’ll have to ditch the blueprint. It seems infinitely easier to just add an option in the Lux section that says something like “Enable manual overrride to turn OFF the lights for current presence session.” I tick that box, and then zero changes are needed in Homekit, Streamdeck, or to use a manual switch. The current bypass is not fit for my use use.
@Blacky hi again
think it would possible in a future version to add a cron trigger ?
There’s already a way in HA to do this: a schedule. Add one into your system and it’ll create you a binary sensor that you can use as a trigger. If you want to change the scheduled time(s) there’s a nice interface to set it the way you want it.
hmmm that means i did not understand how those schedules work. You can only create some interval that looks like a condition more then a trigger.
By cron trigger i ment being able to run the scene every 5 minutes for example in a certain interval.
It behaves like a switch on a timer. From the helper’s menu you get to set the times when it is off and on a weekly pattern. You can create your automation to get triggered when the switch switches on and/or off.
So it’s like I said…
Make one schedule helper that goes on/off every 3 minutes.
The old cron job. You know me… what is your use case?
Hi Richard, thanks for your input. I think this will realy help a lot of people looking for a way to make the trigger run on a schedule. I reckon I should add this to the FAQ and or the " The Settings & Best Practice Guidelines"
There are more then one use cases: lights that i want to turn on only manually, but then have them switch off after 5 mins for example. Also in case of using zwave devices in HA through various integrations, a turn on / off command might miss from time to time (zwave delay or whatnot) - and in the case that ones needs to make sure a certain pump is off but the first command missed, then the cron will make sure it will switch off.