mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[LuxtronikHeatpump] fix channel type of newly defined unknown channels (#11937)
Signed-off-by: Stefan Giehl <stefangiehl@gmail.com>
This commit is contained in:
parent
6deb3f56da
commit
2d32067533
@ -277,8 +277,12 @@ public class LuxtronikHeatpumpHandler extends BaseThingHandler {
|
|||||||
Integer channelId = channel.getChannelId();
|
Integer channelId = channel.getChannelId();
|
||||||
int length = channel.isWritable() ? heatpumpParams.length : heatpumpValues.length;
|
int length = channel.isWritable() ? heatpumpParams.length : heatpumpValues.length;
|
||||||
ChannelUID channelUID = new ChannelUID(thing.getUID(), channel.getCommand());
|
ChannelUID channelUID = new ChannelUID(thing.getUID(), channel.getCommand());
|
||||||
ChannelTypeUID channelTypeUID = new ChannelTypeUID(LuxtronikHeatpumpBindingConstants.BINDING_ID,
|
ChannelTypeUID channelTypeUID;
|
||||||
channel.getCommand());
|
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)
|
if ((channelId != null && length <= channelId)
|
||||||
|| (config.showAllChannels == Boolean.FALSE && !channel.isVisible(visibilityValues))) {
|
|| (config.showAllChannels == Boolean.FALSE && !channel.isVisible(visibilityValues))) {
|
||||||
logger.debug("Hiding channel {}", channel.getCommand());
|
logger.debug("Hiding channel {}", channel.getCommand());
|
||||||
|
Loading…
Reference in New Issue
Block a user