For your 1st “corner case” I’m afraid its just the limitation of your hardware and there is nothing you are doing wrong. There is no way around it, you need a motion sensor with a cooldown of less than a few seconds. (you can use my solution for problem number two, but it feels a bit invasive for a toilet or bathroom) For this I just bought the aqara p1 sensor as it had an adjustable cooldown period of 1-300 seconds or something like that. I set it to 2 seconds, more than enough time for the sensor to catch me inside the room moving just after closing the door.
And for your second issue I use a PIR to turn on the lights and Frigate to turn off the lights, and while I’m at it everything else in the Livingroom.
A small $50-$100 rtsp camera, and a HA server powerful enough to run frigate for object detection.
Any recent desktop or laptop should be enough… not sure about a pie though.
Will try to run i through it’s paces tomorrow instead of the AppDaemon version
Looking at the blueprint it in the visual editor, I think it might help new users if for each helper field you provided the same short description of the type of helper needed as you have in your Requirements section here.
Hi Alex,
thanks a lot for your blueprint. I am quite unexperienced, yet, when it comes to HA automations.
so far, I was able to get the script running and my boolean helper (“bathroom_wasp”) works… what now?
could you please give me some guidance: I want to set a light scene depending on bathroom occupancy, respectively switch off all bathroom lights when the room is empty… how can I achieve that?
Until now I used another blueprint (“toggle scene”) that relies on a motion sensor… however, I cannot simply put my occupancy-helper as trigger there
thanks a lot!
you can use the wasp helper as a trigger for further automations. Just choose as a trigger type State and search for the helper (bathroom_wasp), then you can choose the state changes (off → on for movement and on → off for no movement [as two separate triggers]).
There are also some blueprints that can help you to achieve the light dimming behaviour. Currently, I use a modified version of the default motion blueprint. I also plan to publish my version as soon as I have the time to polish it. Presently, it’s not in a state to be published.
Thank you. Apologies for the confusion, I should have been more clear. What I meant was giving the user the type of a helper they have to create - one of them needs to be of the type “toggle” and the other has to be the “date and time” helper.
I was hoping this would solve my bathroom lighting automation troubles which so far I’ve been battling with a custom automation but it seems I have an issue with the blueprint that hasn’t been mentioned above;
I have an Aqara Human Presence Sensor in the bathroom and it sometimes triggers false positives (wind moving curtains etc.) - when this happens it triggers your blueprint but doesn’t seem to recover (i.e. the input_boolean remains on until the next event).
So i create a automation, that turn on the light, when door is open and turn off it, when input_boolean from this blueprint switch off.
My problem is that i open the door and sit more time in the bathroom (more that about 2 min) the light turn off. When i do some movement, it turn on again and it still on when i’m here in the room. (so works as expected)
it possible to somehow fix that first time not switch off the light and not need to move it?
Hi, I just implemented the automation and run into the known issues.
My Hue motion sensor detects Motion and keeps that state for 10 seconds.
The door sensor acts instandly.
The first motion after opening the door should trigger the occupancy to on and keep it that way if the door is closed. Otherwise you need to move again for the occupancy to stay true.
this is the reason that i create a motion template sensor.
Now my side is working here:
Open the door, trigger the door sensor, the light is on. It also trigger the motion sensor, but this Blueprint is not started, because it not set it directly, set it the template sensor.
15 sec later (it is totally true that the door is closed) the motion template is trigger the blueprint (wasp in the box) and the light is constantly on, not need other movement, because the door is closed, no way to left the room.
If we are finish, open the door. The bluprint is finish. When the motion sensor is “cool down” (and the pre set delay is ower) the light turn it off.
@alexbabel, in addition to toggling the boolean, as an option, would you consider adding the ability to allow the users to enter their own actions when the occupancy goes to on and to off?
I’m guessing a good number is using your blueprint for triggering a set of lights. From the standpoint of usability, the above feature could be useful in not having to chain together two automations to trigger one set of lights.
In either case, as I mentioned before, thanks for your work!
Maybe I’m missing something. Let me check if I understand it.
The idea is when the door is openend for the first time and there is motion detected inside the room, there is a person. As long as the door stays closed, the person is present and thus the light should be turned on. If the door get’s openend again and there hasn’t been a movement for a while the light can be turned off. If the door gets openend but there is still movement then the lights should continue to stay on.
Now I can turn on the lights with opening the door, or even with the boolean be turned on. But the boolean turns of pretty fast. So where do I put the light off command?