Skip to content

[Profiles] Add safe automation profiles and scenes #9

Description

@emi-ran

Feature

Add safe user profiles/scenes: Night, Home, Work, Car, Emergency Battery.

Product boundary

A profile is an explicit user-managed collection of rule references and optional activation state, not a hidden second automation engine. Define whether activating a profile enables member rules, invokes a predefined rule set, or both before implementation; avoid ambiguous recursion.

Requirements

  • Persist profile metadata and ordered member rule IDs with validation for missing/deleted rules.
  • Profile activation/deactivation must be atomic enough that partial member updates produce an honest failure state and history entry.
  • Provide confirmation and capability summaries before applying privileged effects.
  • Encrypted full backup/share may include profiles and referenced rule configuration; normal export follows existing secret sanitization and disabled-import safety.
  • Do not put plaintext secrets or sensitive action inputs into profile previews/history.

Acceptance criteria

  • User can create, edit, activate, deactivate, and delete a profile safely.
  • A profile update does not mutate source rules beyond documented enabled/disabled state.
  • Encrypted export/import preserves profiles; wrong password leaves data unchanged.

Verification

  • Data migration/transaction failure tests, dangling-reference tests, encrypted backup fixtures, and activation history tests.
  • Xiaomi smoke test for a profile containing Wi-Fi, sound profile, and display actions plus denied-capability path.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions