diff --git a/src/panels/config/dashboard/ha-config-updates.ts b/src/panels/config/dashboard/ha-config-updates.ts index 271e398558..539655c3f3 100644 --- a/src/panels/config/dashboard/ha-config-updates.ts +++ b/src/panels/config/dashboard/ha-config-updates.ts @@ -6,6 +6,7 @@ import { ifDefined } from "lit/directives/if-defined"; import memoizeOne from "memoize-one"; import { fireEvent } from "../../../common/dom/fire_event"; import { computeDeviceNameDisplay } from "../../../common/entity/compute_device_name"; +import { getDeviceContext } from "../../../common/entity/get_device_context"; import "../../../components/entity/state-badge"; import "../../../components/ha-alert"; import "../../../components/ha-icon-next"; @@ -76,6 +77,12 @@ class HaConfigUpdates extends SubscribeMixin(LitElement) { ? this.getDeviceEntry(entityEntry.device_id) : undefined; + const areaName = + deviceEntry && deviceEntry.entry_type !== "service" + ? getDeviceContext(deviceEntry, this.hass).area?.name || + this.hass.localize("ui.panel.config.updates.no_area") + : undefined; + return html` ` - : ""} + : nothing} ${deviceEntry @@ -114,10 +121,11 @@ class HaConfigUpdates extends SubscribeMixin(LitElement) { : entity.attributes.friendly_name} + ${areaName ? html`${areaName} βΈ± ` : nothing} ${entity.attributes.title} ${entity.attributes.latest_version} ${entity.attributes.skipped_version ? `(${this.hass.localize("ui.panel.config.updates.skipped")})` - : ""} + : nothing} ${!this.narrow ? entity.attributes.in_progress @@ -130,7 +138,7 @@ class HaConfigUpdates extends SubscribeMixin(LitElement) { > ` : html`` - : ""} + : nothing} `; })} diff --git a/src/translations/en.json b/src/translations/en.json index 8f950019b8..52ac9408b8 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -2119,7 +2119,8 @@ "join_beta": "[%key:supervisor::system::supervisor::join_beta_action%]", "leave_beta": "[%key:supervisor::system::supervisor::leave_beta_action%]", "skipped": "Skipped", - "update_in_progress": "Update in progress" + "update_in_progress": "Update in progress", + "no_area": "No area" }, "repairs": { "caption": "Repairs",