mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-22 08:46:35 +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) {
|
||||
return;
|
||||
}
|
||||
const value = {
|
||||
...this.config!,
|
||||
mode,
|
||||
};
|
||||
|
||||
if (!MODES_MAX.includes(mode)) {
|
||||
delete value.max;
|
||||
}
|
||||
|
||||
fireEvent(this, "value-changed", {
|
||||
value: {
|
||||
...this.config!,
|
||||
mode,
|
||||
max: !MODES_MAX.includes(mode) ? undefined : this.config.max,
|
||||
},
|
||||
value,
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user