diff --git a/gallery/src/pages/more-info/update.ts b/gallery/src/pages/more-info/update.ts index 872a7b2e41..ce4fa4f6f7 100644 --- a/gallery/src/pages/more-info/update.ts +++ b/gallery/src/pages/more-info/update.ts @@ -139,6 +139,13 @@ const ENTITIES = [ title: undefined, friendly_name: "Installing without title", }), + getEntity("update", "update21", "on", { + ...base_attributes, + in_progress: true, + friendly_name: "Update with in_progress true and UPDATE_SUPPORT_PROGRESS", + supported_features: + base_attributes.supported_features + UPDATE_SUPPORT_PROGRESS, + }), ]; @customElement("demo-more-info-update") diff --git a/src/common/entity/compute_state_display.ts b/src/common/entity/compute_state_display.ts index de3acbabe8..80792dca79 100644 --- a/src/common/entity/compute_state_display.ts +++ b/src/common/entity/compute_state_display.ts @@ -169,7 +169,8 @@ export const computeStateDisplayFromEntityAttributes = ( // When update is not available and there is no latest_version show "Unavailable" return state === "on" ? updateIsInstallingFromAttributes(attributes) - ? supportsFeatureFromAttributes(attributes, UPDATE_SUPPORT_PROGRESS) + ? supportsFeatureFromAttributes(attributes, UPDATE_SUPPORT_PROGRESS) && + typeof attributes.in_progress === "number" ? localize("ui.card.update.installing_with_progress", { progress: attributes.in_progress, })