From 8ebd07fa94bc173811a484b92240cd41c9b59148 Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Tue, 22 Oct 2024 23:22:17 +0200 Subject: [PATCH] Config parameter: Add unit to param description when entering UoM values (#2820) Signed-off-by: Florian Hotze --- .../web/src/components/config/config-parameter.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bundles/org.openhab.ui/web/src/components/config/config-parameter.vue b/bundles/org.openhab.ui/web/src/components/config/config-parameter.vue index 2a1c4e7846..65aabb2596 100644 --- a/bundles/org.openhab.ui/web/src/components/config/config-parameter.vue +++ b/bundles/org.openhab.ui/web/src/components/config/config-parameter.vue @@ -10,7 +10,7 @@ Status Code:  {{ status.statusCode }}   {{ status.message }} - + @@ -94,6 +94,13 @@ export default { return ParameterQrcode } return ParameterText + }, + description () { + // TODO: Remove this when proper UoM support is implemented for config parameters + // Adds the unit to the description if it is available, UoM support is currently implemented through number parameters + // where the user can enter the amount for the default unit + if (this.configDescription.unit) return `${this.configDescription.description} (${this.configDescription.unit})` + return this.configDescription.description } }, mounted () {