mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-16 05:46:35 +00:00
Hide skip when auto_update is true for updates (#12184)
This commit is contained in:
parent
c68a1d21ff
commit
8baa0b2a9b
@ -128,6 +128,11 @@ const ENTITIES = [
|
|||||||
supported_features:
|
supported_features:
|
||||||
base_attributes.supported_features + UPDATE_SUPPORT_RELEASE_NOTES,
|
base_attributes.supported_features + UPDATE_SUPPORT_RELEASE_NOTES,
|
||||||
}),
|
}),
|
||||||
|
getEntity("update", "update19", "on", {
|
||||||
|
...base_attributes,
|
||||||
|
friendly_name: "Update with auto update",
|
||||||
|
auto_update: true,
|
||||||
|
}),
|
||||||
];
|
];
|
||||||
|
|
||||||
@customElement("demo-more-info-update")
|
@customElement("demo-more-info-update")
|
||||||
|
@ -13,6 +13,7 @@ export const UPDATE_SUPPORT_BACKUP = 8;
|
|||||||
export const UPDATE_SUPPORT_RELEASE_NOTES = 16;
|
export const UPDATE_SUPPORT_RELEASE_NOTES = 16;
|
||||||
|
|
||||||
interface UpdateEntityAttributes extends HassEntityAttributeBase {
|
interface UpdateEntityAttributes extends HassEntityAttributeBase {
|
||||||
|
auto_update: boolean | null;
|
||||||
current_version: string | null;
|
current_version: string | null;
|
||||||
in_progress: boolean | number;
|
in_progress: boolean | number;
|
||||||
latest_version: string | null;
|
latest_version: string | null;
|
||||||
|
@ -130,14 +130,20 @@ class MoreInfoUpdate extends LitElement {
|
|||||||
: ""}
|
: ""}
|
||||||
<hr />
|
<hr />
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<mwc-button
|
${this.stateObj.attributes.auto_update
|
||||||
@click=${this._handleSkip}
|
? ""
|
||||||
.disabled=${skippedVersion ||
|
: html`
|
||||||
this.stateObj.state === "off" ||
|
<mwc-button
|
||||||
updateIsInstalling(this.stateObj)}
|
@click=${this._handleSkip}
|
||||||
>
|
.disabled=${skippedVersion ||
|
||||||
${this.hass.localize("ui.dialogs.more_info_control.update.skip")}
|
this.stateObj.state === "off" ||
|
||||||
</mwc-button>
|
updateIsInstalling(this.stateObj)}
|
||||||
|
>
|
||||||
|
${this.hass.localize(
|
||||||
|
"ui.dialogs.more_info_control.update.skip"
|
||||||
|
)}
|
||||||
|
</mwc-button>
|
||||||
|
`}
|
||||||
${supportsFeature(this.stateObj, UPDATE_SUPPORT_INSTALL)
|
${supportsFeature(this.stateObj, UPDATE_SUPPORT_INSTALL)
|
||||||
? html`
|
? html`
|
||||||
<mwc-button
|
<mwc-button
|
||||||
|
Loading…
x
Reference in New Issue
Block a user