Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ public void channelUnlinked(ChannelUID channelUID) {
});
}

public boolean hasChannelHandler(ChannelHandler handler) {
return this.channelHandlers.containsKey(handler);
}

@Override
protected void updateState(String channelID, State state) {
super.updateState(channelID, state);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ private boolean channelRequired(Field field) {
}

private void buildMissingBinaryChannel() {
if (getBinaryChannel() == null) {
if (!handler.hasChannelHandler(this) || getBinaryChannel() == null) {
Channel channel = buildBinaryChannel();
handler.registerChannel(channel.getUID(), this);
handler.updateThingWithChannels(Collections.singletonList(channel));
Expand Down