();
+ Object.keys(conditions).forEach((condition) => {
+ const domain = getConditionDomain(condition);
+
+ if (addedDomains.has(domain)) {
+ return;
+ }
+ addedDomains.add(domain);
+
+ const manifest = manifests[domain];
+ const domainUsed = !domains ? true : domains.has(domain);
+
+ if (
+ (type === undefined &&
+ (ENTITY_DOMAINS_MAIN.has(domain) ||
+ (manifest?.integration_type === "entity" &&
+ domainUsed &&
+ !ENTITY_DOMAINS_OTHER.has(domain)))) ||
+ (type === "helper" && manifest?.integration_type === "helper") ||
+ (type === "other" &&
+ !ENTITY_DOMAINS_MAIN.has(domain) &&
+ (ENTITY_DOMAINS_OTHER.has(domain) ||
+ (!domainUsed && manifest?.integration_type === "entity") ||
+ !["helper", "entity"].includes(manifest?.integration_type || "")))
+ ) {
+ result.push({
+ icon: html`
+
+ `,
+ key: `${DYNAMIC_PREFIX}${domain}`,
+ name: domainToName(localize, domain, manifest),
+ description: "",
+ });
+ }
+ });
+ return result.sort((a, b) =>
+ stringCompare(a.name, b.name, this.hass.locale.language)
+ );
+ };
+
+ private _conditions = memoizeOne(
+ (
+ localize: LocalizeFunc,
+ conditions: ConditionDescriptions,
+ _manifests: DomainManifestLookup | undefined,
+ group?: string
+ ): ListItem[] => {
+ if (!conditions) {
+ return [];
+ }
+ const result: ListItem[] = [];
+
+ for (const condition of Object.keys(conditions)) {
+ const domain = getConditionDomain(condition);
+ const conditionName = getConditionObjectId(condition);
+
+ if (group && group !== `${DYNAMIC_PREFIX}${domain}`) {
+ continue;
+ }
+
+ result.push({
+ icon: html`
+
+ `,
+ key: `${DYNAMIC_PREFIX}${condition}`,
+ name:
+ localize(`component.${domain}.conditions.${conditionName}.name`) ||
+ condition,
+ description:
+ localize(
+ `component.${domain}.conditions.${conditionName}.description`
+ ) || condition,
+ });
+ }
+ return result;
+ }
+ );
+
private _services = memoizeOne(
(
localize: LocalizeFunc,
@@ -832,6 +984,7 @@ class DialogAddAutomationElement
this.hass.localize,
this.hass.services,
this._triggerDescriptions,
+ this._conditionDescriptions,
this._manifests
);
@@ -1136,6 +1289,7 @@ class DialogAddAutomationElement
super.disconnectedCallback();
window.removeEventListener("resize", this._updateNarrow);
this._removeSearchKeybindings();
+ this._unsubscribe();
}
private _updateNarrow = () => {
diff --git a/src/panels/config/automation/condition/ha-automation-condition-editor.ts b/src/panels/config/automation/condition/ha-automation-condition-editor.ts
index 6698e7b0483d..c162440519fd 100644
--- a/src/panels/config/automation/condition/ha-automation-condition-editor.ts
+++ b/src/panels/config/automation/condition/ha-automation-condition-editor.ts
@@ -8,11 +8,13 @@ import "../../../../components/ha-yaml-editor";
import type { HaYamlEditor } from "../../../../components/ha-yaml-editor";
import type { Condition } from "../../../../data/automation";
import { expandConditionWithShorthand } from "../../../../data/automation";
+import type { ConditionDescription } from "../../../../data/condition";
import { COLLAPSIBLE_CONDITION_ELEMENTS } from "../../../../data/condition";
import type { HomeAssistant } from "../../../../types";
import "../ha-automation-editor-warning";
import { editorStyles, indentStyle } from "../styles";
import type { ConditionElement } from "./ha-automation-condition-row";
+import "./types/ha-automation-condition-platform";
@customElement("ha-automation-condition-editor")
export default class HaAutomationConditionEditor extends LitElement {
@@ -35,6 +37,8 @@ export default class HaAutomationConditionEditor extends LitElement {
@property({ type: Boolean, attribute: "supported" }) public uiSupported =
false;
+ @property({ attribute: false }) public description?: ConditionDescription;
+
@query("ha-yaml-editor") public yamlEditor?: HaYamlEditor;
@query(COLLAPSIBLE_CONDITION_ELEMENTS.join(", "))
@@ -83,16 +87,23 @@ export default class HaAutomationConditionEditor extends LitElement {
`
: html`
- ${dynamicElement(
- `ha-automation-condition-${condition.condition}`,
- {
- hass: this.hass,
- condition: condition,
- disabled: this.disabled,
- optionsInSidebar: this.indent,
- narrow: this.narrow,
- }
- )}
+ ${this.description
+ ? html``
+ : dynamicElement(
+ `ha-automation-condition-${condition.condition}`,
+ {
+ hass: this.hass,
+ condition: condition,
+ disabled: this.disabled,
+ optionsInSidebar: this.indent,
+ narrow: this.narrow,
+ }
+ )}
`}
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 e4852a036e3e..fc11c1d73d08 100644
--- a/src/panels/config/automation/condition/ha-automation-condition-row.ts
+++ b/src/panels/config/automation/condition/ha-automation-condition-row.ts
@@ -32,6 +32,7 @@ import { copyToClipboard } from "../../../../common/util/copy-clipboard";
import "../../../../components/ha-automation-row";
import type { HaAutomationRow } from "../../../../components/ha-automation-row";
import "../../../../components/ha-card";
+import "../../../../components/ha-condition-icon";
import "../../../../components/ha-expansion-panel";
import "../../../../components/ha-icon-button";
import "../../../../components/ha-md-button-menu";
@@ -44,10 +45,8 @@ import type {
} from "../../../../data/automation";
import { isCondition, testCondition } from "../../../../data/automation";
import { describeCondition } from "../../../../data/automation_i18n";
-import {
- CONDITION_BUILDING_BLOCKS,
- CONDITION_ICONS,
-} from "../../../../data/condition";
+import type { ConditionDescriptions } from "../../../../data/condition";
+import { CONDITION_BUILDING_BLOCKS } from "../../../../data/condition";
import { validateConfig } from "../../../../data/config";
import { fullEntitiesContext } from "../../../../data/context";
import type { EntityRegistryEntry } from "../../../../data/entity_registry";
@@ -130,6 +129,9 @@ export default class HaAutomationConditionRow extends LitElement {
@state() private _warnings?: string[];
+ @property({ attribute: false })
+ public conditionDescriptions: ConditionDescriptions = {};
+
@property({ type: Boolean, attribute: "sidebar" })
public optionsInSidebar = false;
@@ -179,11 +181,11 @@ export default class HaAutomationConditionRow extends LitElement {
private _renderRow() {
return html`
-
+ .hass=${this.hass}
+ .condition=${this.condition.condition}
+ >
${capitalizeFirstLetter(
describeCondition(this.condition, this.hass, this._entityReg)
@@ -395,9 +397,14 @@ export default class HaAutomationConditionRow extends LitElement {
`
@@ -476,7 +483,9 @@ export default class HaAutomationConditionRow extends LitElement {
.hass=${this.hass}
.condition=${this.condition}
.disabled=${this.disabled}
- .uiSupported=${this._uiSupported(this.condition.condition)}
+ .uiSupported=${this._uiSupported(
+ this._getType(this.condition, this.conditionDescriptions)
+ )}
indent
.selected=${this._selected}
.narrow=${this.narrow}
@@ -786,7 +795,10 @@ export default class HaAutomationConditionRow extends LitElement {
cut: this._cutCondition,
test: this._testCondition,
config: sidebarCondition,
- uiSupported: this._uiSupported(sidebarCondition.condition),
+ uiSupported: this._uiSupported(
+ this._getType(sidebarCondition, this.conditionDescriptions)
+ ),
+ description: this.conditionDescriptions[sidebarCondition.condition],
yamlMode: this._yamlMode,
} satisfies ConditionSidebarConfig);
this._selected = true;
@@ -802,6 +814,16 @@ export default class HaAutomationConditionRow extends LitElement {
}
}
+ private _getType = memoizeOne(
+ (condition: Condition, conditionDescriptions: ConditionDescriptions) => {
+ if (condition.condition in conditionDescriptions) {
+ return "platform";
+ }
+
+ return condition.condition;
+ }
+ );
+
private _uiSupported = memoizeOne(
(type: string) =>
customElements.get(`ha-automation-condition-${type}`) !== undefined
diff --git a/src/panels/config/automation/condition/ha-automation-condition.ts b/src/panels/config/automation/condition/ha-automation-condition.ts
index 755abe29da11..b1b024eec7cb 100644
--- a/src/panels/config/automation/condition/ha-automation-condition.ts
+++ b/src/panels/config/automation/condition/ha-automation-condition.ts
@@ -4,6 +4,7 @@ import type { PropertyValues } from "lit";
import { html, LitElement, nothing } from "lit";
import { customElement, property, queryAll, state } from "lit/decorators";
import { repeat } from "lit/directives/repeat";
+import { ensureArray } from "../../../../common/array/ensure-array";
import { storage } from "../../../../common/decorators/storage";
import { fireEvent } from "../../../../common/dom/fire_event";
import { stopPropagation } from "../../../../common/dom/stop_propagation";
@@ -12,11 +13,18 @@ import "../../../../components/ha-button";
import "../../../../components/ha-button-menu";
import "../../../../components/ha-sortable";
import "../../../../components/ha-svg-icon";
-import type {
- AutomationClipboard,
- Condition,
+import {
+ getValueFromDynamic,
+ isDynamic,
+ type AutomationClipboard,
+ type Condition,
} from "../../../../data/automation";
-import { CONDITION_BUILDING_BLOCKS } from "../../../../data/condition";
+import type { ConditionDescriptions } from "../../../../data/condition";
+import {
+ CONDITION_BUILDING_BLOCKS,
+ subscribeConditions,
+} from "../../../../data/condition";
+import { SubscribeMixin } from "../../../../mixins/subscribe-mixin";
import type { HomeAssistant } from "../../../../types";
import {
PASTE_VALUE,
@@ -25,10 +33,9 @@ import {
import { automationRowsStyles } from "../styles";
import "./ha-automation-condition-row";
import type HaAutomationConditionRow from "./ha-automation-condition-row";
-import { ensureArray } from "../../../../common/array/ensure-array";
@customElement("ha-automation-condition")
-export default class HaAutomationCondition extends LitElement {
+export default class HaAutomationCondition extends SubscribeMixin(LitElement) {
@property({ attribute: false }) public hass!: HomeAssistant;
@property({ attribute: false }) public conditions!: Condition[];
@@ -46,6 +53,8 @@ export default class HaAutomationCondition extends LitElement {
@state() private _rowSortSelected?: number;
+ @state() private _conditionDescriptions: ConditionDescriptions = {};
+
@state()
@storage({
key: "automationClipboard",
@@ -64,6 +73,26 @@ export default class HaAutomationCondition extends LitElement {
private _conditionKeys = new WeakMap();
+ protected hassSubscribe() {
+ return [
+ subscribeConditions(this.hass, (conditions) =>
+ this._addConditions(conditions)
+ ),
+ ];
+ }
+
+ private _addConditions(conditions: ConditionDescriptions) {
+ this._conditionDescriptions = {
+ ...this._conditionDescriptions,
+ ...conditions,
+ };
+ }
+
+ protected firstUpdated(changedProps: PropertyValues) {
+ super.firstUpdated(changedProps);
+ this.hass.loadBackendTranslation("conditions");
+ }
+
protected updated(changedProperties: PropertyValues) {
if (!changedProperties.has("conditions")) {
return;
@@ -168,6 +197,7 @@ export default class HaAutomationCondition extends LitElement {
.last=${idx === this.conditions.length - 1}
.totalConditions=${this.conditions.length}
.condition=${cond}
+ .conditionDescriptions=${this._conditionDescriptions}
.disabled=${this.disabled}
.narrow=${this.narrow}
@duplicate=${this._duplicateCondition}
@@ -237,6 +267,10 @@ export default class HaAutomationCondition extends LitElement {
conditions = this.conditions.concat(
deepClone(this._clipboard!.condition)
);
+ } else if (isDynamic(value)) {
+ conditions = this.conditions.concat({
+ condition: getValueFromDynamic(value),
+ });
} else {
const condition = value as Condition["condition"];
const elClass = customElements.get(
diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-platform.ts b/src/panels/config/automation/condition/types/ha-automation-condition-platform.ts
new file mode 100644
index 000000000000..4e04bcd95379
--- /dev/null
+++ b/src/panels/config/automation/condition/types/ha-automation-condition-platform.ts
@@ -0,0 +1,416 @@
+import { mdiHelpCircle } from "@mdi/js";
+import type { PropertyValues } from "lit";
+import { css, html, LitElement, nothing } from "lit";
+import { customElement, property, state } from "lit/decorators";
+import memoizeOne from "memoize-one";
+import { fireEvent } from "../../../../../common/dom/fire_event";
+import { computeDomain } from "../../../../../common/entity/compute_domain";
+import "../../../../../components/ha-checkbox";
+import "../../../../../components/ha-selector/ha-selector";
+import "../../../../../components/ha-settings-row";
+import type { PlatformCondition } from "../../../../../data/automation";
+import {
+ getConditionDomain,
+ getConditionObjectId,
+ type ConditionDescription,
+} from "../../../../../data/condition";
+import type { IntegrationManifest } from "../../../../../data/integration";
+import { fetchIntegrationManifest } from "../../../../../data/integration";
+import type { TargetSelector } from "../../../../../data/selector";
+import type { HomeAssistant } from "../../../../../types";
+import { documentationUrl } from "../../../../../util/documentation-url";
+
+const showOptionalToggle = (field: ConditionDescription["fields"][string]) =>
+ field.selector &&
+ !field.required &&
+ !("boolean" in field.selector && field.default);
+
+@customElement("ha-automation-condition-platform")
+export class HaPlatformCondition extends LitElement {
+ @property({ attribute: false }) public hass!: HomeAssistant;
+
+ @property({ attribute: false }) public condition!: PlatformCondition;
+
+ @property({ attribute: false }) public description?: ConditionDescription;
+
+ @property({ type: Boolean }) public disabled = false;
+
+ @state() private _checkedKeys = new Set();
+
+ @state() private _manifest?: IntegrationManifest;
+
+ public static get defaultConfig(): PlatformCondition {
+ return { condition: "" };
+ }
+
+ protected willUpdate(changedProperties: PropertyValues) {
+ super.willUpdate(changedProperties);
+ if (!this.hasUpdated) {
+ this.hass.loadBackendTranslation("conditions");
+ this.hass.loadBackendTranslation("selector");
+ }
+ if (!changedProperties.has("condition")) {
+ return;
+ }
+ const oldValue = changedProperties.get("condition") as
+ | undefined
+ | this["condition"];
+
+ // Fetch the manifest if we have a condition selected and the condition domain changed.
+ // If no condition is selected, clear the manifest.
+ if (this.condition?.condition) {
+ const domain = getConditionDomain(this.condition.condition);
+
+ const oldDomain = getConditionDomain(oldValue?.condition || "");
+
+ if (domain !== oldDomain) {
+ this._fetchManifest(domain);
+ }
+ } else {
+ this._manifest = undefined;
+ }
+ }
+
+ protected render() {
+ const domain = getConditionDomain(this.condition.condition);
+ const conditionName = getConditionObjectId(this.condition.condition);
+
+ const description = this.hass.localize(
+ `component.${domain}.conditions.${conditionName}.description`
+ );
+
+ const conditionDesc = this.description;
+
+ const shouldRenderDataYaml = !conditionDesc?.fields;
+
+ const hasOptional = Boolean(
+ conditionDesc?.fields &&
+ Object.values(conditionDesc.fields).some((field) =>
+ showOptionalToggle(field)
+ )
+ );
+
+ return html`
+
+ ${description ? html`
${description}
` : nothing}
+ ${this._manifest
+ ? html`
+
+ `
+ : nothing}
+
+ ${conditionDesc && "target" in conditionDesc
+ ? html`
+ ${hasOptional
+ ? html``
+ : nothing}
+ ${this.hass.localize(
+ "ui.components.service-control.target"
+ )}
+ ${this.hass.localize(
+ "ui.components.service-control.target_secondary"
+ )}`
+ : nothing}
+ ${shouldRenderDataYaml
+ ? html``
+ : Object.entries(conditionDesc.fields).map(([fieldName, dataField]) =>
+ this._renderField(
+ fieldName,
+ dataField,
+ hasOptional,
+ domain,
+ conditionName
+ )
+ )}
+ `;
+ }
+
+ private _targetSelector = memoizeOne(
+ (targetSelector: TargetSelector["target"] | null | undefined) =>
+ targetSelector ? { target: { ...targetSelector } } : { target: {} }
+ );
+
+ private _renderField = (
+ fieldName: string,
+ dataField: ConditionDescription["fields"][string],
+ hasOptional: boolean,
+ domain: string | undefined,
+ conditionName: string | undefined
+ ) => {
+ const selector = dataField?.selector ?? { text: null };
+
+ const showOptional = showOptionalToggle(dataField);
+
+ return dataField.selector
+ ? html`
+ ${!showOptional
+ ? hasOptional
+ ? html``
+ : nothing
+ : html``}
+ ${this.hass.localize(
+ `component.${domain}.conditions.${conditionName}.fields.${fieldName}.name`
+ ) || conditionName}
+ ${this.hass.localize(
+ `component.${domain}.conditions.${conditionName}.fields.${fieldName}.description`
+ )}
+
+ `
+ : nothing;
+ };
+
+ private _generateContext(
+ field: ConditionDescription["fields"][string]
+ ): Record | undefined {
+ if (!field.context) {
+ return undefined;
+ }
+
+ const context = {};
+ for (const [context_key, data_key] of Object.entries(field.context)) {
+ context[context_key] =
+ data_key === "target"
+ ? this.condition.target
+ : this.condition.options?.[data_key];
+ }
+ return context;
+ }
+
+ private _dataChanged(ev: CustomEvent) {
+ ev.stopPropagation();
+ if (ev.detail.isValid === false) {
+ // Don't clear an object selector that returns invalid YAML
+ return;
+ }
+ const key = (ev.currentTarget as any).key;
+ const value = ev.detail.value;
+ if (
+ this.condition?.options?.[key] === value ||
+ ((!this.condition?.options || !(key in this.condition.options)) &&
+ (value === "" || value === undefined))
+ ) {
+ return;
+ }
+
+ const options = { ...this.condition?.options, [key]: value };
+
+ if (
+ value === "" ||
+ value === undefined ||
+ (typeof value === "object" && !Object.keys(value).length)
+ ) {
+ delete options[key];
+ }
+
+ fireEvent(this, "value-changed", {
+ value: {
+ ...this.condition,
+ options,
+ },
+ });
+ }
+
+ private _targetChanged(ev: CustomEvent): void {
+ ev.stopPropagation();
+ fireEvent(this, "value-changed", {
+ value: {
+ ...this.condition,
+ target: ev.detail.value,
+ },
+ });
+ }
+
+ private _checkboxChanged(ev) {
+ const checked = ev.currentTarget.checked;
+ const key = ev.currentTarget.key;
+ let options;
+
+ if (checked) {
+ this._checkedKeys.add(key);
+ const field =
+ this.description &&
+ Object.entries(this.description).find(([k, _value]) => k === key)?.[1];
+ let defaultValue = field?.default;
+
+ if (
+ defaultValue == null &&
+ field?.selector &&
+ "constant" in field.selector
+ ) {
+ defaultValue = field.selector.constant?.value;
+ }
+
+ if (
+ defaultValue == null &&
+ field?.selector &&
+ "boolean" in field.selector
+ ) {
+ defaultValue = false;
+ }
+
+ if (defaultValue != null) {
+ options = {
+ ...this.condition?.options,
+ [key]: defaultValue,
+ };
+ }
+ } else {
+ this._checkedKeys.delete(key);
+ options = { ...this.condition?.options };
+ delete options[key];
+ }
+ if (options) {
+ fireEvent(this, "value-changed", {
+ value: {
+ ...this.condition,
+ options,
+ },
+ });
+ }
+ this.requestUpdate("_checkedKeys");
+ }
+
+ private _localizeValueCallback = (key: string) => {
+ if (!this.condition?.condition) {
+ return "";
+ }
+ return this.hass.localize(
+ `component.${computeDomain(this.condition.condition)}.selector.${key}`
+ );
+ };
+
+ private async _fetchManifest(integration: string) {
+ this._manifest = undefined;
+ try {
+ this._manifest = await fetchIntegrationManifest(this.hass, integration);
+ } catch (_err: any) {
+ // eslint-disable-next-line no-console
+ console.log(`Unable to fetch integration manifest for ${integration}`);
+ // Ignore if loading manifest fails. Probably bad JSON in manifest
+ }
+ }
+
+ static styles = css`
+ ha-settings-row {
+ padding: 0 var(--ha-space-4);
+ }
+ ha-settings-row[narrow] {
+ padding-bottom: var(--ha-space-2);
+ }
+ ha-settings-row {
+ --settings-row-content-width: 100%;
+ --settings-row-prefix-display: contents;
+ border-top: var(
+ --service-control-items-border-top,
+ 1px solid var(--divider-color)
+ );
+ }
+ ha-service-picker,
+ ha-entity-picker,
+ ha-yaml-editor {
+ display: block;
+ margin: 0 var(--ha-space-4);
+ }
+ ha-yaml-editor {
+ padding: var(--ha-space-4) 0;
+ }
+ p {
+ margin: 0 var(--ha-space-4);
+ padding: var(--ha-space-4) 0;
+ }
+ :host([hide-picker]) p {
+ padding-top: 0;
+ }
+ .checkbox-spacer {
+ width: 32px;
+ }
+ ha-checkbox {
+ margin-left: calc(var(--ha-space-4) * -1);
+ margin-inline-start: calc(var(--ha-space-4) * -1);
+ margin-inline-end: initial;
+ }
+ .help-icon {
+ color: var(--secondary-text-color);
+ }
+ .description {
+ justify-content: space-between;
+ display: flex;
+ align-items: center;
+ padding-right: 2px;
+ padding-inline-end: 2px;
+ padding-inline-start: initial;
+ }
+ .description p {
+ direction: ltr;
+ }
+ `;
+}
+
+declare global {
+ interface HTMLElementTagNameMap {
+ "ha-automation-condition-platform": HaPlatformCondition;
+ }
+}
diff --git a/src/panels/config/automation/sidebar/ha-automation-sidebar-condition.ts b/src/panels/config/automation/sidebar/ha-automation-sidebar-condition.ts
index ea93c98371d7..f4920fe39c8d 100644
--- a/src/panels/config/automation/sidebar/ha-automation-sidebar-condition.ts
+++ b/src/panels/config/automation/sidebar/ha-automation-sidebar-condition.ts
@@ -16,11 +16,16 @@ import { classMap } from "lit/directives/class-map";
import { keyed } from "lit/directives/keyed";
import { fireEvent } from "../../../../common/dom/fire_event";
import { handleStructError } from "../../../../common/structs/handle-errors";
-import {
- testCondition,
- type ConditionSidebarConfig,
+import type {
+ LegacyCondition,
+ ConditionSidebarConfig,
} from "../../../../data/automation";
-import { CONDITION_BUILDING_BLOCKS } from "../../../../data/condition";
+import { testCondition } from "../../../../data/automation";
+import {
+ CONDITION_BUILDING_BLOCKS,
+ getConditionDomain,
+ getConditionObjectId,
+} from "../../../../data/condition";
import { validateConfig } from "../../../../data/config";
import type { HomeAssistant } from "../../../../types";
import { isMac } from "../../../../util/is_mac";
@@ -84,14 +89,25 @@ export default class HaAutomationSidebarCondition extends LitElement {
"ui.panel.config.automation.editor.conditions.condition"
);
+ const domain =
+ "condition" in this.config.config &&
+ getConditionDomain(this.config.config.condition);
+ const conditionName =
+ "condition" in this.config.config &&
+ getConditionObjectId(this.config.config.condition);
+
const title =
this.hass.localize(
- `ui.panel.config.automation.editor.conditions.type.${type}.label`
- ) || type;
+ `ui.panel.config.automation.editor.conditions.type.${type as LegacyCondition["condition"]}.label`
+ ) ||
+ this.hass.localize(
+ `component.${domain}.conditions.${conditionName}.name`
+ ) ||
+ type;
const description = isBuildingBlock
? this.hass.localize(
- `ui.panel.config.automation.editor.conditions.type.${type}.description.picker`
+ `ui.panel.config.automation.editor.conditions.type.${type as LegacyCondition["condition"]}.description.picker`
)
: "";
@@ -282,6 +298,7 @@ export default class HaAutomationSidebarCondition extends LitElement {
class="sidebar-editor"
.hass=${this.hass}
.condition=${this.config.config}
+ .description=${this.config.description}
.yamlMode=${this.yamlMode}
.uiSupported=${this.config.uiSupported}
@value-changed=${this._valueChangedSidebar}