mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-17 22:36:35 +00:00
Service control: Don't fire value changed for optional empty input (#8705)
This commit is contained in:
parent
a3efa5676b
commit
77972c961b
@ -335,7 +335,10 @@ export class HaServiceControl extends LitElement {
|
|||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
const key = (ev.currentTarget as any).key;
|
const key = (ev.currentTarget as any).key;
|
||||||
const value = ev.detail.value;
|
const value = ev.detail.value;
|
||||||
if (this.value?.data && this.value.data[key] === value) {
|
if (
|
||||||
|
this.value?.data?.[key] === value ||
|
||||||
|
(!this.value?.data?.[key] && (value === "" || value === undefined))
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user