šŸ’” Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time - Light Control - Device Tracker - Night Lights

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?

Thanks @geox19 :smiling_face_with_three_hearts:

I havenā€™t done it yet thanks for the reminder :+1:

@DuckDuck25

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 :+1:

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.

@DuckDuck25

I use it all the time and is required for the future in the road map ahead.

Nice :smiley:

:pensive:

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;

  1. Give me the average over X amount of time.

  2. 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 :smiley:

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:

  1. Iā€™m sitting in my office (presence detected) and the lights have been on for some time due to lux value.

  2. 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.

  3. 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.

@DuckDuck25

This is done by you creating a template sensor. Once you have created it then enter this sensor into the automation. :wink:

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 :smiley:

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 :slight_smile:

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.

1 Like

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.


2 Likes

So itā€™s like I saidā€¦

Make one schedule helper that goes on/off every 3 minutes.

Hi @Momo

The old cron job. You know meā€¦ what is your use case?

@rrozema

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 :+1: :heart:

Blacky :smiley:

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 :slight_smile: