-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use service name in action confirmation popup #8493
Conversation
hass.localize( | ||
"ui.panel.lovelace.editor.action-editor.actions." + | ||
actionConfig.action | ||
) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still want to show this part I think, just add what service will be called?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I think many names assume that they will be used together with the domain/integration name, and not stand alone?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the end-user does not care if it is technically a "service" or not that is being called. So I opted only for the name.
I agree reg. the domain part. Need to see how to best include that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bramkragten I attempted to take over the logic that is also used in the ha-service-picker for the domain. The problem is that I cannot get the translations to get loaded. So the first time the popup gets shown, the domain is not translated, the second time around it is.
I attempted to manually force the "title" loading via hass.loadBackendTranslation("title");
but I did not have any effect.
=> Any hints / tips?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably a timing issue then? Do you await it? And use its result as input for domainToName
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breaking change
Proposed change
If the action is
call-service
we now attempt to look-up the service name and show that in the confirmation popup.Not all services in the backend provide a name currently (I created core PR home-assistant/core#47204 to fix that for HA scripts and Python scripts), but that is not an issue. If there is no service name, we fallback to the current generic handling.
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: