Skip to content

Dispatch actions via HA's native hass-action event#393

Merged
jpettitt merged 1 commit into
masterfrom
native-hass-action
Jul 5, 2026
Merged

Dispatch actions via HA's native hass-action event#393
jpettitt merged 1 commit into
masterfrom
native-hass-action

Conversation

@jpettitt

@jpettitt jpettitt commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Actions now dispatch by firing HA's hass-action event and letting HA core execute them, instead of calling custom-card-helpers' handleClick (dependency removed — it's unmaintained and this was its only use). This restores native confirmation dialogs and security-domain restrictions for lock/cover actions, and supports perform-action / assist.

Behavior detail: a long-press without a hold_action now resolves as a plain tap, matching HA's native rows (previously it opened more-info).

Approach adopted from the duczz/ha-multiple-entity-row fork — thanks @duczz.

Test plan

  • yarn build (lint + 139 tests + webpack) passes
  • Verified live in a local HA instance: confirmation dialog appears and cancels correctly, per-entity tap/hold/double-tap resolve to the right entity, action: none dispatches nothing, long-press without hold_action acts as a tap

Replaces custom-card-helpers' handleClick (dependency now removed) with
firing hass-action and letting HA core execute the action. This restores
native confirmation dialogs and lock/cover security restrictions, and
supports perform-action/assist. A long-press without a hold_action now
resolves as a plain tap, matching HA's native rows.

Approach adopted from the duczz/ha-multiple-entity-row fork.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jpettitt jpettitt merged commit 7b3e32f into master Jul 5, 2026
2 checks passed
@jpettitt jpettitt deleted the native-hass-action branch July 5, 2026 19:50
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