diff --git a/bundles/org.openhab.binding.avmfritz/src/main/java/org/openhab/binding/avmfritz/internal/discovery/AVMFritzUpnpDiscoveryParticipant.java b/bundles/org.openhab.binding.avmfritz/src/main/java/org/openhab/binding/avmfritz/internal/discovery/AVMFritzUpnpDiscoveryParticipant.java index b9c2e14069d33..fa42200ce5a0a 100644 --- a/bundles/org.openhab.binding.avmfritz/src/main/java/org/openhab/binding/avmfritz/internal/discovery/AVMFritzUpnpDiscoveryParticipant.java +++ b/bundles/org.openhab.binding.avmfritz/src/main/java/org/openhab/binding/avmfritz/internal/discovery/AVMFritzUpnpDiscoveryParticipant.java @@ -16,7 +16,6 @@ import static org.openhab.core.thing.Thing.PROPERTY_VENDOR; import java.util.Dictionary; -import java.util.HashMap; import java.util.Map; import java.util.Set; @@ -28,6 +27,7 @@ import org.openhab.core.config.discovery.DiscoveryResult; import org.openhab.core.config.discovery.DiscoveryResultBuilder; import org.openhab.core.config.discovery.upnp.UpnpDiscoveryParticipant; +import org.openhab.core.config.discovery.upnp.internal.UpnpDiscoveryService; import org.openhab.core.thing.ThingTypeUID; import org.openhab.core.thing.ThingUID; import org.osgi.service.component.ComponentContext; @@ -83,16 +83,11 @@ public Set getSupportedThingTypeUIDs() { if (uid != null) { logger.debug("discovered: {} ({}) at {}", device.getDisplayString(), device.getDetails().getFriendlyName(), device.getIdentity().getDescriptorURL().getHost()); - - Map properties = new HashMap<>(); - properties.put(CONFIG_IP_ADDRESS, device.getIdentity().getDescriptorURL().getHost()); - properties.put(PROPERTY_VENDOR, device.getDetails().getManufacturerDetails().getManufacturer()); - - DiscoveryResult result = DiscoveryResultBuilder.create(uid).withProperties(properties) + return DiscoveryResultBuilder.create(uid) + .withProperties(Map.of(CONFIG_IP_ADDRESS, device.getIdentity().getDescriptorURL().getHost(), + PROPERTY_VENDOR, device.getDetails().getManufacturerDetails().getManufacturer())) .withLabel(device.getDetails().getFriendlyName()).withRepresentationProperty(CONFIG_IP_ADDRESS) .build(); - - return result; } } return null; diff --git a/bundles/org.openhab.binding.avmfritz/src/main/resources/OH-INF/thing/bridge-types.xml b/bundles/org.openhab.binding.avmfritz/src/main/resources/OH-INF/thing/bridge-types.xml index 8823f8c37967e..a3aa4405332bc 100644 --- a/bundles/org.openhab.binding.avmfritz/src/main/resources/OH-INF/thing/bridge-types.xml +++ b/bundles/org.openhab.binding.avmfritz/src/main/resources/OH-INF/thing/bridge-types.xml @@ -17,6 +17,8 @@ + ipAddress + @@ -34,6 +36,8 @@ + ipAddress +