@@ -92,7 +92,10 @@ import type {
9292 EntityRegistryEntry ,
9393 UpdateEntityRegistryEntryResult ,
9494} from "../../../data/entity/entity_registry" ;
95- import { updateEntityRegistryEntry } from "../../../data/entity/entity_registry" ;
95+ import {
96+ entityRegistryByEntityId ,
97+ updateEntityRegistryEntry ,
98+ } from "../../../data/entity/entity_registry" ;
9699import type { LabelRegistryEntry } from "../../../data/label/label_registry" ;
97100import {
98101 createLabelRegistryEntry ,
@@ -115,6 +118,8 @@ import { showCategoryRegistryDetailDialog } from "../category/show-dialog-catego
115118import { configSections } from "../ha-panel-config" ;
116119import { showLabelDetailDialog } from "../labels/show-dialog-label-detail" ;
117120import { showNewAutomationDialog } from "./show-dialog-new-automation" ;
121+ import { voiceAssistants } from "../../../data/expose" ;
122+ import { brandsUrl } from "../../../util/brands-url" ;
118123
119124type AutomationItem = AutomationEntity & {
120125 name : string ;
@@ -376,6 +381,43 @@ class HaAutomationPicker extends SubscribeMixin(LitElement) {
376381 > </ ha- icon- butto n>
377382 ` ,
378383 } ,
384+ voice_assistants : {
385+ title : localize (
386+ "ui.panel.config.automation.picker.headers.voice_assistants"
387+ ) ,
388+ type : "icon" ,
389+ showNarrow : true ,
390+ sortable : true ,
391+ filterable : true ,
392+ template : ( automation ) => {
393+ // const entry = this._entityReg.find(
394+ // (reg) => reg.entity_id === automation.entity_id
395+ // );
396+ const entry = entityRegistryByEntityId ( this . _entityReg ) [
397+ automation . entity_id
398+ ] ;
399+ return html ` ${ Object . keys ( voiceAssistants ) . filter (
400+ ( vaKey ) => entry ?. options ?. [ vaKey ] ?. should_expose
401+ ) . length !== 0
402+ ? Object . keys ( voiceAssistants )
403+ . filter ( ( vaKey ) => entry ?. options ?. [ vaKey ] ?. should_expose )
404+ . map (
405+ ( vaKey ) =>
406+ html `<img
407+ alt= ""
408+ src = ${ brandsUrl ( {
409+ domain : voiceAssistants [ vaKey ] . domain ,
410+ type : "icon" ,
411+ darkOptimized : this . hass . themes ?. darkMode ,
412+ } ) }
413+ crossor igin= "anonymous"
414+ referrerpolicy= "no- referrer"
415+ slot= "prefix"
416+ / > `
417+ )
418+ : "—" } `;
419+ } ,
420+ } ,
379421 } ;
380422 return columns ;
381423 }
0 commit comments