Feature
Allow one rule to run its same action sequence for multiple triggers, with OR semantics: App opened OR Wi-Fi connected -> set sound profile Normal.
Design constraints
- Evolve
Automation.triggerEvent and its per-trigger configuration into a versioned list of typed trigger definitions; do not add parallel nullable fields for every trigger.
- Migrate existing single-trigger rules to a one-item list without behavior change.
- A trigger match must identify which trigger fired for history/template context.
- Keep each trigger's current matching data isolated (package, SSID, device address, schedule, geofence, etc.).
- Reconcile demand-driven listeners from every enabled trigger. Registration/unregistration must remain correct when rules are edited, disabled, imported, or deleted.
- Define dedupe/cooldown behavior explicitly: one per-rule cooldown shared across trigger sources unless product decision says otherwise.
Acceptance criteria
- User can add/remove/reorder at least two heterogeneous triggers in Create/Edit.
- Either trigger can execute same ordered action set once; duplicate callbacks do not cause duplicate execution.
- Legacy rule migration, normal export, encrypted backup, encrypted restore, and share work.
Verification
- Unit tests for migration, match union, trigger source labeling, dedupe, cooldown, and listener demand calculation.
- Xiaomi device smoke test for app + Wi-Fi pair, including engine restart and disabled-rule paths.
Feature
Allow one rule to run its same action sequence for multiple triggers, with OR semantics:
App opened OR Wi-Fi connected -> set sound profile Normal.Design constraints
Automation.triggerEventand its per-trigger configuration into a versioned list of typed trigger definitions; do not add parallel nullable fields for every trigger.Acceptance criteria
Verification