diff --git a/src/components/ha-picture-upload.ts b/src/components/ha-picture-upload.ts index 809d6a2b23..b18852cc3c 100644 --- a/src/components/ha-picture-upload.ts +++ b/src/components/ha-picture-upload.ts @@ -39,6 +39,7 @@ export class HaPictureUpload extends LitElement { .uploading=${this._uploading} .value=${this.value ? html`` : ""} @file-picked=${this._handleFilePicked} + @change=${this._handleFileCleared} accept="image/png, image/jpeg, image/gif" > `; @@ -53,6 +54,10 @@ export class HaPictureUpload extends LitElement { } } + private async _handleFileCleared() { + this.value = null; + } + private async _cropFile(file: File) { if (!["image/png", "image/jpeg", "image/gif"].includes(file.type)) { showAlertDialog(this, {