Go to file
2024-01-02 02:03:10 -08:00
mikes-motion-activated-scenes.yaml Re-enable old "on before off" code 2024-01-02 02:03:10 -08:00
README.md Add README 2023-12-27 22:22: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.