Skip to content

Commit

Permalink
[tr064] fix comment in SOAP request (openhab#9671)
Browse files Browse the repository at this point in the history
* fix comment in SAOP request
* fix typo in channel-name

Signed-off-by: Jan N. Klug <[email protected]>
  • Loading branch information
J-N-K authored Jan 3, 2021
1 parent 3f85658 commit ed92bd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ public static void checkAvailableChannels(Thing thing, ThingBuilder thingBuilder
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
Expand All @@ -228,7 +229,7 @@ public static void checkAvailableChannels(Thing thing, ThingBuilder thingBuilder
.withLabel(channelTypeDescription.getLabel() + " " + parameter);
thingBuilder.withChannel(channelBuilder.build());
Tr064ChannelConfig channelConfig1 = new Tr064ChannelConfig(channelConfig);
channelConfig1.setParameter(parameter);
channelConfig1.setParameter(rawParameter);
channels.put(channelUID, channelConfig1);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
serviceId="urn:WANDSLIfConfig-com:serviceId:WANDSLInterfaceConfig1"/>
<getAction name="GetInfo" argument="NewDownstreamAttenuation"/>
</channel>
<channel name="dslUpstreamAttentuation" label="DSL Upstream Attenuation">
<channel name="dslUpstreamAttenuation" label="DSL Upstream Attenuation">
<item type="Number:Dimensionless" unit="dB" statePattern="%.1f dB"/>
<service deviceType="urn:dslforum-org:device:WANDevice:1"
serviceId="urn:WANDSLIfConfig-com:serviceId:WANDSLInterfaceConfig1"/>
Expand Down

0 comments on commit ed92bd9

Please sign in to comment.