Skip to content

Resolve service name and icon for shortcut card and badge#51850

Merged
wendevlin merged 2 commits intodevfrom
shortcut_card_action_default
May 4, 2026
Merged

Resolve service name and icon for shortcut card and badge#51850
wendevlin merged 2 commits intodevfrom
shortcut_card_action_default

Conversation

@piitaya
Copy link
Copy Markdown
Member

@piitaya piitaya commented May 4, 2026

Proposed change

For shortcut cards and badges with a perform-action tap action, the displayed label and icon now reflect the chosen service instead of falling back to a generic bell icon and the raw service ID.

For example, frontend.reload_themes now shows "Reload themes" with the service's icon (or a per-domain fallback while the icon resolves), rather than frontend.reload_themes with the generic bell.

Screenshots

CleanShot 2026-05-04 at 12 14 24

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes Shortcut Card Icon not changing #51823
  • This PR is related to issue or discussion:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to backend pull request:

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • I have followed the perfect PR recommendations
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

To help with the load of incoming pull requests:

@piitaya piitaya added this to the 2026.5 milestone May 4, 2026
Copy link
Copy Markdown
Member

@wendevlin wendevlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like that we create here a new class that uses the full hass object even it's not needed. I think it's just needed for serviceIcon so we also need to change getServiceIcons -> getCategoryIcons.

If you think it's too much for a beta change, we can approve as it is, but I would vote for defining the hass scope for the class.

@piitaya
Copy link
Copy Markdown
Member Author

piitaya commented May 4, 2026

Yeah, it's also used for localize and loadBackendTranslations. So the change will be too much for beta scope.

@wendevlin
Copy link
Copy Markdown
Member

Yeah, it's also used for localize and loadBackendTranslations. So the change will be too much for beta scope.

Mhh but this can be just passed from hass into the serviceController right? I don't see a big change in other places here.

@piitaya piitaya requested a review from wendevlin May 4, 2026 12:14
@wendevlin wendevlin merged commit a288ad4 into dev May 4, 2026
12 checks passed
@wendevlin wendevlin deleted the shortcut_card_action_default branch May 4, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shortcut Card Icon not changing

2 participants