Use service name in action confirmation popup#8493
Use service name in action confirmation popup#8493spacegaier merged 6 commits intohome-assistant:devfrom
Conversation
| hass.localize( | ||
| "ui.panel.lovelace.editor.action-editor.actions." + | ||
| actionConfig.action | ||
| ) || |
There was a problem hiding this comment.
We still want to show this part I think, just add what service will be called?
There was a problem hiding this comment.
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.
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.
@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.
Probably a timing issue then? Do you await it? And use its result as input for domainToName?

Breaking change
Proposed change
If the action is
call-servicewe 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: