File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ import "../../../../components/ha-md-divider";
2020import "../../../../components/ha-md-menu-item" ;
2121import { ACTION_BUILDING_BLOCKS } from "../../../../data/action" ;
2222import type { ActionSidebarConfig } from "../../../../data/automation" ;
23- import type { RepeatAction } from "../../../../data/script" ;
23+ import { domainToName } from "../../../../data/integration" ;
24+ import type { RepeatAction , ServiceAction } from "../../../../data/script" ;
2425import type { HomeAssistant } from "../../../../types" ;
2526import { isMac } from "../../../../util/is_mac" ;
2627import type HaAutomationConditionEditor from "../action/ha-automation-action-editor" ;
@@ -83,11 +84,23 @@ export default class HaAutomationSidebarAction extends LitElement {
8384 "ui.panel.config.automation.editor.actions.action"
8485 ) ;
8586
86- const title =
87+ let title =
8788 this . hass . localize (
8889 `ui.panel.config.automation.editor.actions.type.${ type } .label` as LocalizeKeys
8990 ) || type ;
9091
92+ if ( type === "service" && ( actionConfig as ServiceAction ) . action ) {
93+ const [ domain , service ] = ( actionConfig as ServiceAction ) . action ! . split (
94+ "." ,
95+ 2
96+ ) ;
97+ title = `${ domainToName ( this . hass . localize , domain ) } : ${
98+ this . hass . localize ( `component.${ domain } .services.${ service } .name` ) ||
99+ this . hass . services [ domain ] [ service ] ?. name ||
100+ title
101+ } `;
102+ }
103+
91104 const description = isBuildingBlock
92105 ? this . hass . localize (
93106 `ui.panel.config.automation.editor.actions.type.${ type } .description.picker` as LocalizeKeys
You can’t perform that action at this time.
0 commit comments