From 2d32067533af8bfadc78ce152015270f2c546568 Mon Sep 17 00:00:00 2001 From: Stefan Giehl Date: Sun, 2 Jan 2022 16:57:41 +0100 Subject: [PATCH] [LuxtronikHeatpump] fix channel type of newly defined unknown channels (#11937) Signed-off-by: Stefan Giehl --- .../internal/LuxtronikHeatpumpHandler.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.luxtronikheatpump/src/main/java/org/openhab/binding/luxtronikheatpump/internal/LuxtronikHeatpumpHandler.java b/bundles/org.openhab.binding.luxtronikheatpump/src/main/java/org/openhab/binding/luxtronikheatpump/internal/LuxtronikHeatpumpHandler.java index 1ebd8697e..a7131f9d6 100644 --- a/bundles/org.openhab.binding.luxtronikheatpump/src/main/java/org/openhab/binding/luxtronikheatpump/internal/LuxtronikHeatpumpHandler.java +++ b/bundles/org.openhab.binding.luxtronikheatpump/src/main/java/org/openhab/binding/luxtronikheatpump/internal/LuxtronikHeatpumpHandler.java @@ -277,8 +277,12 @@ public class LuxtronikHeatpumpHandler extends BaseThingHandler { Integer channelId = channel.getChannelId(); int length = channel.isWritable() ? heatpumpParams.length : heatpumpValues.length; ChannelUID channelUID = new ChannelUID(thing.getUID(), channel.getCommand()); - ChannelTypeUID channelTypeUID = new ChannelTypeUID(LuxtronikHeatpumpBindingConstants.BINDING_ID, - channel.getCommand()); + ChannelTypeUID channelTypeUID; + if (channel.getCommand().matches("^channel[0-9]+$")) { + channelTypeUID = new ChannelTypeUID(LuxtronikHeatpumpBindingConstants.BINDING_ID, "unknown"); + } else { + channelTypeUID = new ChannelTypeUID(LuxtronikHeatpumpBindingConstants.BINDING_ID, channel.getCommand()); + } if ((channelId != null && length <= channelId) || (config.showAllChannels == Boolean.FALSE && !channel.isVisible(visibilityValues))) { logger.debug("Hiding channel {}", channel.getCommand());