Skip to main content

Create a Trigger

Goal: run a macro automatically when something happens — a door opens, a temperature crosses a threshold, motion is detected.

A trigger (attribute trigger) watches an attribute and runs an action when its value changes and a condition is met. Triggers are GEM's event-driven automation, as opposed to schedules (time-based) and macros (manually run).

Before you start

  • You're logged in as an administrator.
  • The macro you want the trigger to run already exists (see Build a Macro), or you'll create it as part of this flow.
  • You know which attribute carries the event — e.g. a door zone's open/closed state, a sensor's motion attribute, a thermostat's temperature.

Steps

  1. Open Triggers and click Add.

    Open Triggers

  2. Basic Settings

    • Trigger Namelowercase_with_underscores (e.g. door_alert, temp_warning).
    • Debounce (minutes) — minimum time between activations. Set this for noisy sources (a motion sensor that fires every second) so the action runs at most once per interval. Default is 0.
    • Status — enable the trigger.
  3. Trigger Condition — choose the attribute to watch and the comparison that should fire it (equals, greater than, changed, etc.) against a value. This is the event.

  4. Additional Condition (optional gate) — an extra condition that must also be true for the action to run. Use it to scope a trigger — e.g. only when the site is in "Away" mode, or only when another zone is off.

  5. Action to Execute — select the macro to run when the trigger fires.

  6. Schedule Configuration — optionally limit the trigger to specific days and hours (e.g. motion lighting only after sunset). Outside that window the trigger won't act.

  7. Click Create Trigger.

Verify it

Cause the event (open the door, trip the sensor, change the value) and confirm the macro runs. If it fires too often, raise the debounce; if it fires when it shouldn't, tighten the additional condition or the active hours.