mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +00:00
Fix max being undefined in automation (#8771)
This commit is contained in:
parent
f159219d2c
commit
03f9964c59
@ -279,12 +279,17 @@ export class HaManualAutomationEditor extends LitElement {
|
|||||||
if (mode === this.config!.mode) {
|
if (mode === this.config!.mode) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const value = {
|
||||||
|
...this.config!,
|
||||||
|
mode,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!MODES_MAX.includes(mode)) {
|
||||||
|
delete value.max;
|
||||||
|
}
|
||||||
|
|
||||||
fireEvent(this, "value-changed", {
|
fireEvent(this, "value-changed", {
|
||||||
value: {
|
value,
|
||||||
...this.config!,
|
|
||||||
mode,
|
|
||||||
max: !MODES_MAX.includes(mode) ? undefined : this.config.max,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user