Hi there,
This is just another motion automation.
Get started
Click the badge to import this Blueprint: (needs Home Assistant Core 2021.3 or higher)
Or import this Blueprint by using the Gist URL:
Capabilitys
- Trigger on motion (in fact can be triggered by anything that switches between “on” and off")
- Wait time for turning off
- Only run if entity is in desired state (optional)
- Sun elevation check (optional)
- 4 Scenes for different times of day (optional)
- ambient support with time frame (optional)
- Default scene when motion stops (optional)
- “no motion blocker” with user choosable state (optional)
What can i do with that stuff?
- The simplest thing you can do is turn a light on when a motion sensor detects movement and turn it off when movement stops.
- Instead of a motion sensor you can use a group to trigger this (very usefull if you want to group multiple motion sensors)
- Anything what switches between “on” and “off” can trigger this automation (So an input boolean too)
- With the automation blocker (only run if entity is in desired state) you can block this automation from running. This is can be usefull though you want an nightmode where you dont want to run this or when you have “TV Time” on in the living room with special light setting and do not want to change them during this time. You can use the automation blocker chooser to decide whether this blocker should be on or off. The used entity must be something with the states “on” and “off”
- With the sun elevation check you can block this automation from running depending on the angle of the sun. Usefull when you only want to run this when it is getting dark/ before sunrise.
- With scene support you can define different scenes for the day. Like special lights in the morning, normal lights during the day, dimmed lights in the evening and just a 30% Red light during the night to go on the bathroom.
- With ambient support you can, during a specified time frame, have a default light and when motion starts lights change to whatever you want and after motion stops it goes back to ambient lights.
- With default scene when motion stops you can execute a scene instead of turning of lights. This is usefull if you only want to use scenes or if you must. This is the case if you use switches instead of lights.
- With the “no motion blocker” you can deactivate the actions if the entity switches to “off” (for configured wait time). You can use this if you want that nothing happens if you do something (which needs to set the blocker in the desired state) which needed the lights in its original states. Like you are going in the bathroom and your lights go on via motion. Now you take a shower and the motion sensor do not see you anymore. But humidity spikes which activates the no motion blocker, so lights stay on.
Flowcharts for better unstanding:
When no motion entity switches to “off” for desired wait time:
I am by no means an automation expert for Home Assistant (used node red before) but i am willing to add stuff to this if it possible (for me)
If you encounter any bug please post them so they can be fixed.
If you are missing a feature feel free to post them too.
Wishlist
- Trigger another automation
- Light Level as condition (optional)
- Offset for working days
Changelog
20.12.2020: Added Automation Blocker (Only run if input_boolean is true)
21.12.2020: Removed entity from motion entity input
23.12.2020: Added sun elevation check
23.12.2020: Added optional default scene when motion stops
27.12.2020: Make automation blocker user choosable
30.12.2020: Add no motion blocker with user choosable state
01.01.2021: V08: restructure of action logic
04.01.2021: V09: fixed bug with elevation check
06.01.2021: V10: blocker must not be input boolean but can be anything with “on”/“off”
Originally forked from Enhanced motion controller to activate scenes by time and illuminance - now in addition with idle ambient scene