Go to file
2024-02-18 22:55:37 -08:00
mikes-motion-activated-scenes.yaml Re-enable old "on before off" code 2024-01-02 02:03:10 -08:00
README.md Added disclaimer so I can mirror this to the WAN 2024-02-18 22:33:32 -08:00

Mike's Motion Activated Scenes

by Mike Peralta

This is another "motion activated light" automation blueprint for Home Assistant. It uses scenes rather than toggling to allow for robust behavior and attempts to adjust its delay dynamically based on activity.

It features several stages after motion is no longer detected:

  • Initial delay (nothing happens)

  • Notice: Configurable scene + delay

  • Warning: Configurable scene + delay

  • Off

The initial delay starts off at a user configured number of seconds. Each time the user interrupts the off-sequence with motion, the delay gets multiplied by a user configured multiplier, with a user configurable limit. When the user allows the off-sequence to complete (the off-scene activates), the delay resets to the user configured baseline. This allows a room to stay on longer when there is frequent activity, but shorter when activity is infrequent.

The automation also obeys a toggle helper to enable/disable motion activation. The user can configure which scene to use when when disabled.

This automation can retry a scene multiple times in a row to help overcome buggy/slow networks or lights that fail to set brightness/color correctly when first turned on.

Disclaimer

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

By using this software you agree to the disclaimer.