diff --git a/gallery/src/pages/components/ha-expansion-panel.ts b/gallery/src/pages/components/ha-expansion-panel.ts
index 0fbbc69694..56eb284aa2 100644
--- a/gallery/src/pages/components/ha-expansion-panel.ts
+++ b/gallery/src/pages/components/ha-expansion-panel.ts
@@ -1,4 +1,4 @@
-import { mdiPacMan } from "@mdi/js";
+import { mdiLightbulbOn, mdiPacMan } from "@mdi/js";
import type { TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement } from "lit/decorators";
@@ -125,6 +125,23 @@ const SAMPLES: {
`;
},
},
+ {
+ template(slot, leftChevron) {
+ return html`
+
+
+ ${SHORT_TEXT}
+
+ `;
+ },
+ },
];
@customElement("demo-components-ha-expansion-panel")
diff --git a/src/components/ha-expansion-panel.ts b/src/components/ha-expansion-panel.ts
index ae300508cf..6604123d48 100644
--- a/src/components/ha-expansion-panel.ts
+++ b/src/components/ha-expansion-panel.ts
@@ -1,6 +1,6 @@
import { mdiChevronDown } from "@mdi/js";
import type { PropertyValues, TemplateResult } from "lit";
-import { css, html, LitElement } from "lit";
+import { css, html, LitElement, nothing } from "lit";
import { customElement, property, query, state } from "lit/decorators";
import { classMap } from "lit/directives/class-map";
import { fireEvent } from "../common/dom/fire_event";
@@ -13,11 +13,11 @@ export class HaExpansionPanel extends LitElement {
@property({ type: Boolean, reflect: true }) outlined = false;
- @property({ attribute: false, type: Boolean, reflect: true }) leftChevron =
- false;
+ @property({ attribute: "left-chevron", type: Boolean, reflect: true })
+ public leftChevron = false;
- @property({ attribute: false, type: Boolean, reflect: true }) noCollapse =
- false;
+ @property({ attribute: "no-collapse", type: Boolean, reflect: true })
+ public noCollapse = false;
@property() header?: string;
@@ -28,6 +28,14 @@ export class HaExpansionPanel extends LitElement {
@query(".container") private _container!: HTMLDivElement;
protected render(): TemplateResult {
+ const chevronIcon = this.noCollapse
+ ? nothing
+ : html`
+
+ `;
return html`
- ${this.leftChevron && !this.noCollapse
- ? html`
-
- `
- : ""}
+ ${this.leftChevron ? chevronIcon : nothing}
+
- ${!this.leftChevron && !this.noCollapse
- ? html`
-
- `
- : ""}
+ ${!this.leftChevron ? chevronIcon : nothing}
@@ -177,7 +172,8 @@ export class HaExpansionPanel extends LitElement {
margin-inline-end: initial;
}
- :host([leftchevron]) .summary-icon {
+ :host([left-chevron]) .summary-icon,
+ ::slotted([slot="leading-icon"]) {
margin-left: 0;
margin-right: 8px;
margin-inline-start: 0;
diff --git a/src/components/ha-filter-blueprints.ts b/src/components/ha-filter-blueprints.ts
index 53c20e079f..18839b7cb6 100644
--- a/src/components/ha-filter-blueprints.ts
+++ b/src/components/ha-filter-blueprints.ts
@@ -45,7 +45,7 @@ export class HaFilterBlueprints extends LitElement {
protected render() {
return html`
item.icon);
return html`
+ ${this.schema.icon
+ ? html`
+
+ `
+ : this.schema.iconPath
+ ? html`
+
+ `
+ : nothing}
- ${this.schema.icon
- ? html` `
- : this.schema.iconPath
- ? html`
-
- `
- : nothing}
${this.schema.title || this.computeLabel?.(this.schema)}
diff --git a/src/components/ha-service-control.ts b/src/components/ha-service-control.ts
index 70ff1c5f97..a6f9d0126d 100644
--- a/src/components/ha-service-control.ts
+++ b/src/components/ha-service-control.ts
@@ -523,7 +523,7 @@ export class HaServiceControl extends LitElement {
return fields.length &&
this._hasFilteredFields(fields, targetEntities)
? html`
`
: nothing}
-
-
- ${type === "service" &&
- "action" in this.action &&
- this.action.action
- ? html`
+ ${type === "service" && "action" in this.action && this.action.action
+ ? html`
+ `
- : html`
+ `
+ : html`
+ `}
+ >
+ `}
+
${capitalizeFirstLetter(
describeAction(
this.hass,
@@ -640,9 +644,6 @@ export default class HaAutomationActionRow extends LitElement {
display: inline-block;
color: var(--secondary-text-color);
opacity: 0.9;
- margin-right: 8px;
- margin-inline-end: 8px;
- margin-inline-start: initial;
}
}
.card-content {
diff --git a/src/panels/config/automation/condition/ha-automation-condition-row.ts b/src/panels/config/automation/condition/ha-automation-condition-row.ts
index 80a32ec849..ea8c6240d7 100644
--- a/src/panels/config/automation/condition/ha-automation-condition-row.ts
+++ b/src/panels/config/automation/condition/ha-automation-condition-row.ts
@@ -128,12 +128,13 @@ export default class HaAutomationConditionRow extends LitElement {
`
: ""}
-
+
+
-
${capitalizeFirstLetter(
describeCondition(this.condition, this.hass, this._entityReg)
)}
@@ -526,9 +527,6 @@ export default class HaAutomationConditionRow extends LitElement {
display: inline-block;
color: var(--secondary-text-color);
opacity: 0.9;
- margin-right: 8px;
- margin-inline-end: 8px;
- margin-inline-start: initial;
}
}
.card-content {
diff --git a/src/panels/config/automation/option/ha-automation-option-row.ts b/src/panels/config/automation/option/ha-automation-option-row.ts
index 862adbd9d3..a6e4c80475 100644
--- a/src/panels/config/automation/option/ha-automation-option-row.ts
+++ b/src/panels/config/automation/option/ha-automation-option-row.ts
@@ -92,7 +92,7 @@ export default class HaAutomationOptionRow extends LitElement {
return html`
diff --git a/src/panels/config/automation/trigger/ha-automation-trigger-row.ts b/src/panels/config/automation/trigger/ha-automation-trigger-row.ts
index aa090886c7..c2cdf73b4a 100644
--- a/src/panels/config/automation/trigger/ha-automation-trigger-row.ts
+++ b/src/panels/config/automation/trigger/ha-automation-trigger-row.ts
@@ -159,12 +159,13 @@ export default class HaAutomationTriggerRow extends LitElement {
`
: nothing}
-
+
+
-
${describeTrigger(this.trigger, this.hass, this._entityReg)}
@@ -672,9 +673,6 @@ export default class HaAutomationTriggerRow extends LitElement {
display: inline-block;
color: var(--secondary-text-color);
opacity: 0.9;
- margin-right: 8px;
- margin-inline-end: 8px;
- margin-inline-start: initial;
}
}
.card-content {
diff --git a/src/panels/config/blueprint/blueprint-generic-editor.ts b/src/panels/config/blueprint/blueprint-generic-editor.ts
index a08e6e7869..840f7f1946 100644
--- a/src/panels/config/blueprint/blueprint-generic-editor.ts
+++ b/src/panels/config/blueprint/blueprint-generic-editor.ts
@@ -130,13 +130,16 @@ export abstract class HaBlueprintGenericEditor extends LitElement {
.expanded=${expanded}
.noCollapse=${anyRequired}
>
-