mirror of
https://github.com/home-assistant/frontend.git
synced 2026-02-04 01:10:33 -06:00
Delete stop response variable on empty (#28362)
This commit is contained in:
parent
cca4cc512b
commit
086aa5fa28
@ -64,8 +64,15 @@ export class HaStopAction extends LitElement implements ActionElement {
|
||||
|
||||
private _responseChanged(ev: Event) {
|
||||
ev.stopPropagation();
|
||||
const newAction = { ...this.action };
|
||||
const newValue = (ev.target as any).value;
|
||||
if (newValue) {
|
||||
newAction.response_variable = newValue;
|
||||
} else {
|
||||
delete newAction.response_variable;
|
||||
}
|
||||
fireEvent(this, "value-changed", {
|
||||
value: { ...this.action, response_variable: (ev.target as any).value },
|
||||
value: newAction,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user