ZBMINI L2 in combination with motion sensor

Hi all,

I’m trying to create a Home Assistant automation setup with the following behavior:

  • A motion sensor should automatically turn on and off a light.
  • However, if a physical light switch (ZBMINIL2, connected via Zigbee2MQTT) is used to toggle the light manually, I want that action to override the motion automation for a period of time (e.g., 30 minutes).
  • After that time, the motion automation can take back control.

I’m not sure how best to structure the automations to:

  1. Detect manual toggles from the ZBMINIL2 and activate the override
  2. Prevent the motion sensor from controlling the light during the override period
  3. Resume motion automation after the override times out

Has anyone implemented something similar or have advice on how to handle the override logic cleanly?

Thanks in advance!

I believe people have written blueprints that do this.
Search Blueprints Exchange - Home Assistant Community to either use one of those ot make-it-your-own and lift some of the code on how they did it to do it your way.

Tips on Searching for Answers & Duplicate Topics in the Forum.