Skip to content

Add Home Assistant actions with shared connection settings - #2299

Open
liranmizrahi1 wants to merge 1 commit into
keymapperorg:developfrom
liranmizrahi1:feature/home-assistant-actions
Open

liranmizrahi1 wants to merge 1 commit into
keymapperorg:developfrom
liranmizrahi1:feature/home-assistant-actions

Conversation

@liranmizrahi1

Copy link
Copy Markdown

Adds a dedicated Home Assistant action so mapped buttons can control smart-home entities without manually configuring HTTP requests.

Changes

  • Fetch and search entities by friendly name or entity ID, display their state, and configure a service with optional JSON data.
  • Configure the server URL and token once in Settings → Home Assistant. Verify the entered connection before saving; show loading, success, and failure states.
  • Encrypt saved connection settings with AES-256-GCM and a non-exportable Android Keystore key. New actions reference these settings and omit credentials from mapping data. Connection fields embedded in existing actions remain readable.
  • Support TV remote navigation through the forms: focus inputs without editing, press OK to edit, restore focus after service selection, and navigate to Done.
  • Add HomeAssistant-tagged connection diagnostics without logging tokens or response bodies, a configurable Rust target list for ARM/ARM64 debug APKs, and a changelog entry.

Validation

  • Full debug unit-test suite with Java 21: 668 tests, 0 failures, 0 errors (0 skipped).
  • Regression coverage includes connection verification and cancellation, shared settings, authenticated encryption and tamper rejection, mapping persistence, TV focus, and remote activation of the action-card Test control.
  • Android emulator instrumentation: Keystore encryption/decryption, fresh nonces, and non-exportable key verification passed.
  • ktlint formatting and checks passed for the changed Kotlin files in base, data, and system.
  • Debug APK build with -PkeymapperRustTargets=arm,arm64.

Saved connection ciphertext cannot be decrypted after restoring onto a device without its Keystore key; the user must configure the connection again. Keystore encryption protects stored credentials, but does not prevent use of the token by a compromised app process or device.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant