mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 03:06:41 +00:00
Fix condition key function for template shorthand notation (#18107)
This commit is contained in:
parent
3a94deef69
commit
e730649a8d
@ -150,7 +150,7 @@ export default class HaAutomationCondition extends LitElement {
|
|||||||
: null}
|
: null}
|
||||||
<div class="conditions">
|
<div class="conditions">
|
||||||
${repeat(
|
${repeat(
|
||||||
this.conditions,
|
this.conditions.filter((c) => typeof c === "object"),
|
||||||
(condition) => this._getKey(condition),
|
(condition) => this._getKey(condition),
|
||||||
(cond, idx) => html`
|
(cond, idx) => html`
|
||||||
<ha-automation-condition-row
|
<ha-automation-condition-row
|
||||||
@ -348,6 +348,8 @@ export default class HaAutomationCondition extends LitElement {
|
|||||||
conditions[index] = newValue;
|
conditions[index] = newValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.conditions = conditions;
|
||||||
|
|
||||||
fireEvent(this, "value-changed", { value: conditions });
|
fireEvent(this, "value-changed", { value: conditions });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -558,10 +558,10 @@ export class HaAutomationEditor extends KeyboardShortcutMixin(LitElement) {
|
|||||||
|
|
||||||
private _valueChanged(ev: CustomEvent<{ value: AutomationConfig }>) {
|
private _valueChanged(ev: CustomEvent<{ value: AutomationConfig }>) {
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
|
this._config = ev.detail.value;
|
||||||
if (this._readOnly) {
|
if (this._readOnly) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this._config = ev.detail.value;
|
|
||||||
this._dirty = true;
|
this._dirty = true;
|
||||||
this._errors = undefined;
|
this._errors = undefined;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user