In plain english, I created a script based on this blueprint with my Aqara motion sensor and set up the obvious logic. I called this first one “Bathroom Light Motion Actions” and then created a second automation called “Bathroom Light Motion Trigger” (above) that triggers the blueprint automation after .5 seconds of motion. Might can get away with less than that even.
This gives the Aqara sensor a brief moment to get an illuminance reading before doing the “less than” logic.
For reference my “Bathroom Light Motion Actions” below:
this does not work for me. Trying to set a simple automation that activates a script which turns on the main tv and turns off a nightlight if motion is detected between 4:15am and 6:00am. I set the input helper times but the automation turns on the tv no matter what time it is. what am i doing wrong? i tried removing the script and just added the tv device but that also turns on anytime motion is detected, no within the timeframe set by the input helpers
Are you sure you dont have any other (old) automations to turn on the tv of run the script when the binary_sensor.lr_motion turns on? You can check your home assistant Logbook to see if any automations are triggering when the motion sensor is tripped.
I think I could use a little help with this. I imported this blueprint, and ran actions, and out of all of the several here, this is the ONLY one that turned on my GE zwave light switch.
I have a smartthings motion sensor, and it shows up on cards as Clear and Detected for motion. So for the life of me I can’t get the BP to register the motion sensor telling the switch to come on. I’m no coder, but it seems like the BP is looking for diff input.
Thanks in advance!
You can try defining the input number with a lower minimum value than 1.
For instance, if you want the turn off wait time to be 30 seconds, the value of the input number should be 0.5.
The blueprint expects the triggering entity to have a state ‘on’ when there is motion.
You can check the exact state in the developer tools in Home Assistant, when motion is detected. This state is not the same as what the lovelace frontend says (like ‘Detected’).
The developer tools can be found in the left menu of Home Assistant, when go to the states page and find the entity that you want to be your triggering entity. And see what the state is the moment that motion is detected. If it is ‘on’, then that entity should be compatible with this blueprint.
Ok, I actually got it working. Sorry, Just pretty new to this, so big learning curve. Question: Can a certain helper, I have one that set the delay time in minutes input_number.waittime. Can this exact helper be used elsewhere in another automation/blueprint, or does this helper in this automation(yours) only work here?
I’m wondering if I set it in another different automation, if its possible the value in one automation becomes the same across all automations. Or is that not how it works. Thanks!
If you define an input_number helper entity, it can be used anywhere.
It is an independent entity not bound to this blueprint/automation.
So you can reuse it, if you want to use the same value also in other automations/scripts etc.
Great. Thanks for the info. It’s been a job so far, building back the automations I had in smartthings, so I can wean off of it. Only a few more to go Thanks again for the work on the blueprint! … it’s taught me quite a bit so far, and easier for me to learn by working with whats there and expanding from there.
I still don’t know why yours is the only one out of maybe 3-4 others here, similar, that will turn on my light. Oh well.
Another question as well. In the blocking entity, can I use another motion sensor, and as I think that as that 2nd motion sensor picks up motion, it will -not- allow the automation to turn the light off after wait time. However, if the blocking entity clears, (off), will the automation then start the waittime countdown, or just shut it off immediately after the blocker clears, or does clearing the blocker start the waittime counter ?
Thanks!
Just as a note, at least in the lovelace dashboard, if I used the same entity in 2 diff cards, when i built the second card, if I changed that entity in one card, it changed -both- entries in both cards…, so changing
input_datetime.add_time_after in one card, changed it in the second card.