From eeb69197c63a698d098cbdf85121c3cc88ca6436 Mon Sep 17 00:00:00 2001 From: Mark Herwege Date: Sun, 10 Mar 2024 10:07:52 +0100 Subject: [PATCH] unitSymbol for GroupItem (#4106) Signed-off-by: Mark Herwege --- .../openhab/core/io/rest/core/item/EnrichedItemDTOMapper.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bundles/org.openhab.core.io.rest.core/src/main/java/org/openhab/core/io/rest/core/item/EnrichedItemDTOMapper.java b/bundles/org.openhab.core.io.rest.core/src/main/java/org/openhab/core/io/rest/core/item/EnrichedItemDTOMapper.java index c8c1272cb..e66966479 100644 --- a/bundles/org.openhab.core.io.rest.core/src/main/java/org/openhab/core/io/rest/core/item/EnrichedItemDTOMapper.java +++ b/bundles/org.openhab.core.io.rest.core/src/main/java/org/openhab/core/io/rest/core/item/EnrichedItemDTOMapper.java @@ -99,6 +99,9 @@ public class EnrichedItemDTOMapper { unitSymbol = numberItem.getUnitSymbol(); } if (item instanceof GroupItem groupItem) { + if (groupItem.getBaseItem() instanceof NumberItem baseNumberItem) { + unitSymbol = baseNumberItem.getUnitSymbol(); + } EnrichedItemDTO[] memberDTOs; if (drillDown) { Collection members = new LinkedHashSet<>();