From adbcdc62eb56e6414d1dd17ee0ba07ab4faab18f Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 2 Oct 2024 15:41:15 +0200 Subject: [PATCH] Alert user when auto update is enabled instead of hiding the button (#22187) --- .../more-info/controls/more-info-update.ts | 56 +++++++++++-------- src/translations/en.json | 4 +- 2 files changed, 36 insertions(+), 24 deletions(-) diff --git a/src/dialogs/more-info/controls/more-info-update.ts b/src/dialogs/more-info/controls/more-info-update.ts index 1829325fc7..521d924589 100644 --- a/src/dialogs/more-info/controls/more-info-update.ts +++ b/src/dialogs/more-info/controls/more-info-update.ts @@ -18,6 +18,7 @@ import { updateReleaseNotes, } from "../../../data/update"; import type { HomeAssistant } from "../../../types"; +import { showAlertDialog } from "../../generic/show-dialog-box"; @customElement("more-info-update") class MoreInfoUpdate extends LitElement { @@ -127,29 +128,27 @@ class MoreInfoUpdate extends LitElement { ` : ""}
- ${this.stateObj.attributes.auto_update - ? "" - : this.stateObj.state === BINARY_STATE_OFF && - this.stateObj.attributes.skipped_version - ? html` - - ${this.hass.localize( - "ui.dialogs.more_info_control.update.clear_skipped" - )} - - ` - : html` - - ${this.hass.localize( - "ui.dialogs.more_info_control.update.skip" - )} - - `} + ${this.stateObj.state === BINARY_STATE_OFF && + this.stateObj.attributes.skipped_version + ? html` + + ${this.hass.localize( + "ui.dialogs.more_info_control.update.clear_skipped" + )} + + ` + : html` + + ${this.hass.localize( + "ui.dialogs.more_info_control.update.skip" + )} + + `} ${supportsFeature(this.stateObj, UpdateEntityFeature.INSTALL) ? html`