Use media selector for media_player.play_media (#26559)

This commit is contained in:
karwosts
2025-08-27 03:39:40 -07:00
committed by GitHub
parent c8be25dfc2
commit 673ca8ba4b
9 changed files with 91 additions and 158 deletions

View File

@@ -244,14 +244,7 @@ class DialogAddAutomationElement extends LitElement implements HassDialog {
manifests?: DomainManifestLookup
): ListItem[] => {
if (type === "action" && isService(group)) {
let result = this._services(localize, services, manifests, group);
if (group === `${SERVICE_PREFIX}media_player`) {
result = [
this._convertToItem("play_media", {}, type, localize),
...result,
];
}
return result;
return this._services(localize, services, manifests, group);
}
const groups = this._getGroups(type, group);