ha-selector-select fires spurious valueChanged on initialization (#16216)

This commit is contained in:
karwosts 2023-04-18 23:58:18 -07:00 committed by GitHub
parent 4ff450c5c3
commit afa071465c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -213,7 +213,7 @@ export class HaSelectSelector extends LitElement {
private _valueChanged(ev) {
ev.stopPropagation();
const value = ev.detail?.value || ev.target.value;
if (this.disabled || value === undefined) {
if (this.disabled || value === undefined || value === this.value) {
return;
}
fireEvent(this, "value-changed", {