From bebc76e4524cfb96cd478403d5860819cac076c2 Mon Sep 17 00:00:00 2001 From: J-N-K Date: Sun, 3 Jan 2021 18:46:50 +0100 Subject: [PATCH] [tr064] fix comment in SOAP request (#9671) * fix comment in SAOP request * fix typo in channel-name Signed-off-by: Jan N. Klug --- .../java/org/openhab/binding/tr064/internal/util/Util.java | 5 +++-- .../src/main/resources/channels.xml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bundles/org.openhab.binding.tr064/src/main/java/org/openhab/binding/tr064/internal/util/Util.java b/bundles/org.openhab.binding.tr064/src/main/java/org/openhab/binding/tr064/internal/util/Util.java index d5884b91a..6aa65a13a 100644 --- a/bundles/org.openhab.binding.tr064/src/main/java/org/openhab/binding/tr064/internal/util/Util.java +++ b/bundles/org.openhab.binding.tr064/src/main/java/org/openhab/binding/tr064/internal/util/Util.java @@ -219,7 +219,8 @@ public class Util { parameters.forEach(parameter -> { // remove comment: split parameter at '#', discard everything after that and remove // trailing spaces - String normalizedParameter = UIDUtils.encode(parameter.split("#")[0].trim()); + String rawParameter = parameter.split("#")[0].trim(); + String normalizedParameter = UIDUtils.encode(rawParameter); ChannelUID channelUID = new ChannelUID(thing.getUID(), channelId + "_" + normalizedParameter); ChannelBuilder channelBuilder = ChannelBuilder @@ -228,7 +229,7 @@ public class Util { .withLabel(channelTypeDescription.getLabel() + " " + parameter); thingBuilder.withChannel(channelBuilder.build()); Tr064ChannelConfig channelConfig1 = new Tr064ChannelConfig(channelConfig); - channelConfig1.setParameter(parameter); + channelConfig1.setParameter(rawParameter); channels.put(channelUID, channelConfig1); }); } diff --git a/bundles/org.openhab.binding.tr064/src/main/resources/channels.xml b/bundles/org.openhab.binding.tr064/src/main/resources/channels.xml index 2958727b9..7f705b1ae 100644 --- a/bundles/org.openhab.binding.tr064/src/main/resources/channels.xml +++ b/bundles/org.openhab.binding.tr064/src/main/resources/channels.xml @@ -236,7 +236,7 @@ serviceId="urn:WANDSLIfConfig-com:serviceId:WANDSLInterfaceConfig1"/> - +