From 8e962fdecb4a7cec9a12c45b832e8e27af6ff69e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Fri, 1 Apr 2022 19:28:39 +0200 Subject: [PATCH] Use installed_version for update entities (#12194) --- gallery/src/pages/more-info/update.ts | 8 ++++---- src/data/update.ts | 2 +- src/dialogs/more-info/controls/more-info-update.ts | 4 ++-- src/translations/en.json | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gallery/src/pages/more-info/update.ts b/gallery/src/pages/more-info/update.ts index ea531adc56..65d8e0bf7f 100644 --- a/gallery/src/pages/more-info/update.ts +++ b/gallery/src/pages/more-info/update.ts @@ -18,7 +18,7 @@ import { LONG_TEXT } from "../../data/text"; const base_attributes = { title: "Awesome", - current_version: "1.2.2", + installed_version: "1.2.2", latest_version: "1.2.3", release_url: "https://home-assistant.io", supported_features: UPDATE_SUPPORT_INSTALL, @@ -50,7 +50,7 @@ const ENTITIES = [ }), getEntity("update", "update5", "off", { ...base_attributes, - current_version: "1.2.3", + installed_version: "1.2.3", friendly_name: "No update", }), getEntity("update", "update6", "off", { @@ -102,8 +102,8 @@ const ENTITIES = [ }), getEntity("update", "update14", "off", { ...base_attributes, - current_version: null, - friendly_name: "Update without current_version", + installed_version: null, + friendly_name: "Update without installed_version", }), getEntity("update", "update15", "off", { ...base_attributes, diff --git a/src/data/update.ts b/src/data/update.ts index f6f06da0dc..1818f3d4d7 100644 --- a/src/data/update.ts +++ b/src/data/update.ts @@ -14,7 +14,7 @@ export const UPDATE_SUPPORT_RELEASE_NOTES = 16; interface UpdateEntityAttributes extends HassEntityAttributeBase { auto_update: boolean | null; - current_version: string | null; + installed_version: string | null; in_progress: boolean | number; latest_version: string | null; release_summary: string | null; diff --git a/src/dialogs/more-info/controls/more-info-update.ts b/src/dialogs/more-info/controls/more-info-update.ts index 8fe18779b2..b48dfcf8a9 100644 --- a/src/dialogs/more-info/controls/more-info-update.ts +++ b/src/dialogs/more-info/controls/more-info-update.ts @@ -66,11 +66,11 @@ class MoreInfoUpdate extends LitElement {
${this.hass.localize( - "ui.dialogs.more_info_control.update.current_version" + "ui.dialogs.more_info_control.update.installed_version" )}
- ${this.stateObj.attributes.current_version ?? + ${this.stateObj.attributes.installed_version ?? this.hass.localize("state.default.unavailable")}
diff --git a/src/translations/en.json b/src/translations/en.json index 7a7dcc5032..e4cde9f090 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -731,7 +731,7 @@ "setting": "Setting" }, "update": { - "current_version": "Current version", + "installed_version": "Installed version", "latest_version": "Latest version", "release_announcement": "Read release announcement", "skip": "Skip",