832a71380f
- Fix bug where initial timeout wouldn't be interruptted by enabled_helper - Turned scene repeat delay into a variable (non-input for now) - Fixed enabled_helper==off not repeating the ON scene - Tried clarifying some logs, aliases, comments |
||
---|---|---|
mikes-motion-activated-scenes.yaml | ||
README.md |
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.