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.
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?
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.
No problem.
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
and
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.
Nice
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
Blacky
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.
Blacky
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.
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.
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"
Nice one
Blacky
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.
and more