Skip to content

Commit

Permalink
Add trace log
Browse files Browse the repository at this point in the history
Signed-off-by: Olivier Marceau <[email protected]>
  • Loading branch information
olivierkeke committed Nov 15, 2021
1 parent d18a84e commit dcd33c5
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ private void updateStatesForChannels(Frame frame) {
for (Entry<Label, String> entry : frame.getLabelToValues().entrySet()) {
Label label = entry.getKey();
if (!label.getChannelName().equals(NOT_A_CHANNEL)) {
logger.trace("Update channel {} to value {}", label.getChannelName(), entry.getValue());
if (label == Label.PTEC) {
updateState(label.getChannelName(), StringType.valueOf(entry.getValue().replace(".", "")));
} else if (label.getType() == ValueType.STRING) {
Expand All @@ -154,6 +155,7 @@ private void updateStatesForChannels(Frame frame) {
if (!label.getTimestampChannelName().equals(NOT_A_CHANNEL)) {
String timestamp = frame.getAsDateTime(label);
if (!timestamp.isEmpty()) {
logger.trace("Update channel {} to value {}", label.getTimestampChannelName(), timestamp);
updateState(label.getTimestampChannelName(), DateTimeType.valueOf(timestamp));
}
}
Expand Down

0 comments on commit dcd33c5

Please sign in to comment.