Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 15, 2025

Fixes #27504

Summary

The action editor sidebar and bottom sheet headers now display descriptive action information using the describeAction helper function. This brings actions in line with how triggers and conditions display their headers, providing better clarity about what action is being edited.

Changes

Updated ha-automation-sidebar-action.ts to use the describeAction helper function along with entity, label, and floor registries to generate dynamic header content. The implementation uses describeAction directly for the title, which automatically handles:

  • Displaying the action alias when one is set
  • Showing descriptive action information (e.g., "Turn on light.living_room")
  • Falling back to the action type label when no alias or specific description is available

The subtitle is always "Action" for consistency.

Examples

Service action without alias

  • Title: "Turn on light.living_room" (or similar descriptive text)
  • Subtitle: "Action"

Service action with alias "Turn on lights"

  • Title: "Turn on lights"
  • Subtitle: "Action"

Delay action without alias

  • Title: "Delay for 5 minutes" (or similar descriptive text)
  • Subtitle: "Action"

Delay action with alias "Wait 5 minutes"

  • Title: "Wait 5 minutes"
  • Subtitle: "Action"

Benefits

  1. Consistency: Actions now use the same describeAction helper that's used elsewhere in the codebase
  2. Clarity: Users see descriptive information about the action they're editing
  3. Alias support: Custom aliases are automatically displayed when set
  4. Simplicity: Leverages existing logic in describeAction rather than duplicating it
  5. No breaking changes: Works seamlessly in both side panel (desktop) and bottom sheet (mobile) layouts

Testing

Tested with various action types including service, delay, choose, device, if/then, and repeat actions, both with and without custom aliases.

Original prompt

Fixes #27504

Summary

  • When viewing an action in the automation/script editor side panel or bottom sheet, the header currently always shows the static text "Perform action".
  • Triggers and conditions already display a descriptive header (name and/or type). Actions should be consistent by displaying the selected action name (i.e., the action type label such as "Call service", "Delay", "Choose", etc.).

Steps to reproduce

  1. Open Settings → Automations & Scenes → Automations.
  2. Edit an automation and add an action (e.g., Call service, Delay, Choose, Device Action, etc.).
  3. Open the action to edit it so the side panel or bottom sheet is shown.
  4. Observe the header/title currently reads "Perform action".

Expected behavior

  • The header should display the selected action name (localized), matching what is shown in the action picker and consistent with how triggers/conditions headers work.
  • Examples of expected headers:
    • "Call service"
    • "Delay"
    • "Choose"
    • "Device action"
  • Optional (nice to have, if easily available following existing patterns): If the action has an alias/name (e.g., alias in the action config), the header can show the alias as the main title and the action type as a subtitle, mirroring the triggers/conditions header style. If this introduces complexity, just showing the action type name is sufficient to resolve the issue.

Implementation notes

  • Locate the components responsible for rendering the action editor side panel and bottom sheet headers (search for the literal "Perform action"). These are likely within the automation/script editor components under src/panels/config/automation or related script editor paths.
  • Replace the hardcoded header string with a computed, localized label derived from the current action config. There are existing helpers for trigger/condition descriptions; use the analogous helper for actions (e.g., a function like describeAction / describeAction-style utilities used elsewhere in the codebase). The label must be localized via our existing i18n helpers, not hardcoded.
  • Ensure both the side panel and the bottom sheet variants use the updated logic so the header is correct in both contexts.
  • Keep TypeScript strictness and Lit patterns. Avoid any, use proper types for action objects.
  • Do not introduce console logging.

Acceptance criteria

  • Header for action edit UI shows the localized action type label instead of the static "Perform action" text.
  • Behavior matches across side panel and bottom sheet.
  • No regressions in triggers/conditions headers.
  • Lint, type-check, and tests pass: yarn lint, yarn lint:types, and yarn test.

Testing guidance

  • Test with common action types: Call service, Delay, Choose, Device action, Event, Wait for trigger, Repeat, If/Then, etc.
  • Verify in both desktop (side panel) and mobile (bottom sheet) layouts.
  • Confirm RTL still renders correctly.

Changelog entry

  • Automation editor: Show selected action name in header instead of generic "Perform action".

This pull request was created as a result of the following prompt from Copilot chat.

Fixes #27504

Summary

  • When viewing an action in the automation/script editor side panel or bottom sheet, the header currently always shows the static text "Perform action".
  • Triggers and conditions already display a descriptive header (name and/or type). Actions should be consistent by displaying the selected action name (i.e., the action type label such as "Call service", "Delay", "Choose", etc.).

Steps to reproduce

  1. Open Settings → Automations & Scenes → Automations.
  2. Edit an automation and add an action (e.g., Call service, Delay, Choose, Device Action, etc.).
  3. Open the action to edit it so the side panel or bottom sheet is shown.
  4. Observe the header/title currently reads "Perform action".

Expected behavior

  • The header should display the selected action name (localized), matching what is shown in the action picker and consistent with how triggers/conditions headers work.
  • Examples of expected headers:
    • "Call service"
    • "Delay"
    • "Choose"
    • "Device action"
  • Optional (nice to have, if easily available following existing patterns): If the action has an alias/name (e.g., alias in the action config), the header can show the alias as the main title and the action type as a subtitle, mirroring the triggers/conditions header style. If this introduces complexity, just showing the action type name is sufficient to resolve the issue.

Implementation notes

  • Locate the components responsible for rendering the action editor side panel and bottom sheet headers (search for the literal "Perform action"). These are likely within the automation/script editor components under src/panels/config/automation or related script editor paths.
  • Replace the hardcoded header string with a computed, localized label derived from the current action config. There are existing helpers for trigger/condition descriptions; use the analogous helper for actions (e.g., a function like describeAction / describeAction-style utilities used elsewhere in the codebase). The label must be localized via our existing i18n helpers, not hardcoded.
  • Ensure both the side panel and the bottom sheet variants use the updated logic so the header is correct in both contexts.
  • Keep TypeScript strictness and Lit patterns. Avoid any, use proper types for action objects.
  • Do not introduce console logging.

Acceptance criteria

  • Header for action edit UI shows the localized action type label instead of the static "Perform action" text.
  • Behavior matches across side panel and bottom sheet.
  • No regressions in triggers/conditions headers.
  • Lint, type-check, and tests pass: yarn lint, yarn lint:types, and yarn test.

Testing guidance

  • Test with common action types: Call service, Delay, Choose, Device action, Event, Wait for trigger, Repeat, If/Then, etc.
  • Verify in both desktop (side panel) and mobile (bottom sheet) layouts.
  • Confirm RTL still renders correctly.

Changelog entry

  • Automation editor: Show selected action name in header instead of generic "Perform action".

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

… labels

Co-authored-by: MindFreeze <5219205+MindFreeze@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Fix action header to show selected action name Show action type in sidebar header instead of generic "Action" text Oct 15, 2025
@Copilot Copilot AI requested a review from MindFreeze October 15, 2025 09:44
Copilot finished work on behalf of MindFreeze October 15, 2025 09:44
Co-authored-by: MindFreeze <5219205+MindFreeze@users.noreply.github.com>
@Copilot Copilot AI changed the title Show action type in sidebar header instead of generic "Action" text Show action description in sidebar header using describeAction Oct 15, 2025
@Copilot Copilot AI requested a review from MindFreeze October 15, 2025 10:18
Copilot finished work on behalf of MindFreeze October 15, 2025 10:18
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.

Display action name in configuration header

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.