[YAML thing provider] Handles properly channels with group (#5181)

Fix openhab/openhab-webui#3562

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
lolodomo
2025-12-12 08:45:42 +01:00
committed by GitHub
parent 82ed8b3d05
commit 2789e69d5e
@@ -492,10 +492,9 @@ public class YamlThingProvider extends AbstractProvider<Thing>
if (channel.getChannelTypeUID() != null) {
// We create again the user defined channel because channel type was potentially not yet
// in the registry when the channel was initially created
newChannel = createChannel(target.getUID(), channel.getUID().getIdWithoutGroup(),
channel.getChannelTypeUID(), channel.getKind(), channel.getAcceptedItemType(),
channel.getLabel(), channel.getDescription(), channel.getAutoUpdatePolicy(),
channel.getConfiguration(), false);
newChannel = createChannel(target.getUID(), channel.getUID().getId(), channel.getChannelTypeUID(),
channel.getKind(), channel.getAcceptedItemType(), channel.getLabel(),
channel.getDescription(), channel.getAutoUpdatePolicy(), channel.getConfiguration(), false);
}
channelsToAdd.add(newChannel);
}