mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-20 02:38:53 +00:00
Fix automation add TCA search icons (#28490)
Fix automation add TCA seach icons
This commit is contained in:
@@ -339,40 +339,39 @@ export class HaAutomationAddSearch extends LitElement {
|
|||||||
></ha-tree-indicator>
|
></ha-tree-indicator>
|
||||||
`
|
`
|
||||||
: nothing}
|
: nothing}
|
||||||
${item.icon
|
${(item as AutomationItemComboBoxItem).renderedIcon
|
||||||
? html`<ha-icon slot="start" .icon=${item.icon}></ha-icon>`
|
? html`<div slot="start">
|
||||||
: item.icon_path
|
${(item as AutomationItemComboBoxItem).renderedIcon}
|
||||||
? html`<ha-svg-icon
|
</div>`
|
||||||
slot="start"
|
: item.icon
|
||||||
.path=${item.icon_path}
|
? html`<ha-icon slot="start" .icon=${item.icon}></ha-icon>`
|
||||||
></ha-svg-icon>`
|
: item.icon_path || type === "area"
|
||||||
: type === "entity" && (item as EntityComboBoxItem).stateObj
|
? html`<ha-svg-icon
|
||||||
? html`
|
slot="start"
|
||||||
<state-badge
|
.path=${item.icon_path || mdiTextureBox}
|
||||||
slot="start"
|
></ha-svg-icon>`
|
||||||
.stateObj=${(item as EntityComboBoxItem).stateObj}
|
: type === "entity" && (item as EntityComboBoxItem).stateObj
|
||||||
.hass=${this.hass}
|
|
||||||
></state-badge>
|
|
||||||
`
|
|
||||||
: type === "device" && (item as DevicePickerItem).domain
|
|
||||||
? html`
|
? html`
|
||||||
<ha-domain-icon
|
<state-badge
|
||||||
slot="start"
|
slot="start"
|
||||||
|
.stateObj=${(item as EntityComboBoxItem).stateObj}
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.domain=${(item as DevicePickerItem).domain!}
|
></state-badge>
|
||||||
brand-fallback
|
|
||||||
></ha-domain-icon>
|
|
||||||
`
|
`
|
||||||
: type === "floor"
|
: type === "device" && (item as DevicePickerItem).domain
|
||||||
? html`<ha-floor-icon
|
? html`
|
||||||
slot="start"
|
<ha-domain-icon
|
||||||
.floor=${(item as FloorComboBoxItem).floor!}
|
|
||||||
></ha-floor-icon>`
|
|
||||||
: type === "area"
|
|
||||||
? html`<ha-svg-icon
|
|
||||||
slot="start"
|
slot="start"
|
||||||
.path=${item.icon_path || mdiTextureBox}
|
.hass=${this.hass}
|
||||||
></ha-svg-icon>`
|
.domain=${(item as DevicePickerItem).domain!}
|
||||||
|
brand-fallback
|
||||||
|
></ha-domain-icon>
|
||||||
|
`
|
||||||
|
: type === "floor"
|
||||||
|
? html`<ha-floor-icon
|
||||||
|
slot="start"
|
||||||
|
.floor=${(item as FloorComboBoxItem).floor!}
|
||||||
|
></ha-floor-icon>`
|
||||||
: nothing}
|
: nothing}
|
||||||
<span slot="headline">${item.primary}</span>
|
<span slot="headline">${item.primary}</span>
|
||||||
${item.secondary
|
${item.secondary
|
||||||
@@ -792,7 +791,7 @@ export class HaAutomationAddSearch extends LitElement {
|
|||||||
id: key,
|
id: key,
|
||||||
primary: name,
|
primary: name,
|
||||||
secondary: description,
|
secondary: description,
|
||||||
iconPath,
|
icon_path: iconPath,
|
||||||
renderedIcon: icon,
|
renderedIcon: icon,
|
||||||
type,
|
type,
|
||||||
search_labels: {
|
search_labels: {
|
||||||
|
|||||||
Reference in New Issue
Block a user