Fix number selector (#11585)

This commit is contained in:
Bram Kragten 2022-02-07 17:17:32 +01:00 committed by GitHub
parent e72a4e4a20
commit 22df03427f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,9 +62,9 @@ export class HaNumberSelector extends LitElement {
private _handleInputChange(ev) {
ev.stopPropagation();
const value =
ev.detail.value === "" || isNaN(ev.detail.value)
ev.target.value === "" || isNaN(ev.target.value)
? undefined
: Number(ev.detail.value);
: Number(ev.target.value);
if (this.value === value) {
return;
}