Skip to content

Commit 184ef67

Browse files
authored
[Freeathome] Some more fixes (openhab#18094)
* Improved debug output and refined comments. Signed-off-by: Martin Littkovsky [email protected] Signed-off-by: JankKeks <[email protected]>
1 parent 15b3c05 commit 184ef67

File tree

3 files changed

+140
-80
lines changed

3 files changed

+140
-80
lines changed

bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/datamodel/FreeAtHomeDatapoint.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ DatapointDirection searchForDatapoint(DatapointDirection direction, int neededPa
8787
this.channelId = channelId;
8888
this.datapointId = datapointId;
8989

90-
logger.debug("Datapoint is found - channel {} - datapoint {}", this.channelId, this.datapointId);
90+
logger.debug("Datapoint is found - channel {} - datapoint {} - pairngId {}", this.channelId,
91+
this.datapointId, neededPairingIDFunction);
9192

9293
foundId = true;
9394
}

bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/datamodel/FreeAtHomeDatapointGroup.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@
1212
*/
1313
package org.openhab.binding.freeathome.internal.datamodel;
1414

15-
import static org.openhab.binding.freeathome.internal.datamodel.FreeAtHomeDatapoint.*;
16-
1715
import org.eclipse.jdt.annotation.NonNullByDefault;
1816
import org.eclipse.jdt.annotation.Nullable;
17+
import org.openhab.binding.freeathome.internal.datamodel.FreeAtHomeDatapoint.DatapointDirection;
1918
import org.openhab.binding.freeathome.internal.util.FreeAtHomeGeneralException;
2019
import org.openhab.binding.freeathome.internal.util.PidTranslationUtils;
2120
import org.openhab.binding.freeathome.internal.valuestateconverter.BooleanValueStateConverter;
@@ -58,6 +57,10 @@ public enum DatapointGroupDirection {
5857
outputDatapoint = null;
5958
}
6059

60+
public boolean isValid() {
61+
return (inputDatapoint != null || outputDatapoint != null);
62+
}
63+
6164
boolean addDatapointToGroup(DatapointDirection direction, int neededPairingId, String channelId,
6265
JsonObject jsonObjectOfChannel) {
6366
FreeAtHomeDatapoint newDatapoint = new FreeAtHomeDatapoint();

0 commit comments

Comments
 (0)