From ca8f8d0aed1deffc109867f9c86fefa3a600c1c3 Mon Sep 17 00:00:00 2001 From: Pierre GAUFILLET Date: Sat, 25 May 2024 17:01:30 +0200 Subject: [PATCH] Trim blanks and invisible characters from property value for discovery. --- .../openhab/binding/zigbee/internal/ZigBeeThingTypeMatcher.java | 2 +- org.openhab.binding.zigbee/src/main/resources/discovery.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/internal/ZigBeeThingTypeMatcher.java b/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/internal/ZigBeeThingTypeMatcher.java index 502c9b06a..d36a2aea9 100644 --- a/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/internal/ZigBeeThingTypeMatcher.java +++ b/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/internal/ZigBeeThingTypeMatcher.java @@ -127,7 +127,7 @@ private synchronized void readDiscoveryProperties() throws IOException { continue; } - newProperties.add(new RequiredProperty(discoveryElement[0].trim(), unescape(discoveryElement[1].trim()))); + newProperties.add(new RequiredProperty(discoveryElement[0].trim(), unescape(discoveryElement[1]).trim())); } if (newProperties.isEmpty()) { diff --git a/org.openhab.binding.zigbee/src/main/resources/discovery.txt b/org.openhab.binding.zigbee/src/main/resources/discovery.txt index 0aaebea99..fc16ce278 100644 --- a/org.openhab.binding.zigbee/src/main/resources/discovery.txt +++ b/org.openhab.binding.zigbee/src/main/resources/discovery.txt @@ -15,7 +15,7 @@ xiaomi_lumisensormagnet,modelId=lumi.sensor_magnet xiaomi_lumiremotemini,modelId=lumi.remote.b1acn01 innr-rc-110,vendor=innr,modelId=RC 110 osram-switch-4x-eu,vendor=OSRAM,modelId=Switch 4x EU-LIGHTIFY -legrand_dimmer_without_neutral,vendor=\u001f Legrand,modelId=\u001f Dimmer switch w/o neutral +legrand_dimmer_without_neutral,vendor=Legrand,modelId=Dimmer switch w/o neutral tuya_ts0041,modelId=TS0041 tuya_ts0042,modelId=TS0042 tuya_ts0043,modelId=TS0043