diff --git a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/discovery/HomeAssistantDiscovery.java b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/discovery/HomeAssistantDiscovery.java index 56319555d60..948f3c88497 100644 --- a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/discovery/HomeAssistantDiscovery.java +++ b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/java/org/openhab/binding/mqtt/homeassistant/internal/discovery/HomeAssistantDiscovery.java @@ -177,12 +177,13 @@ public class HomeAssistantDiscovery extends AbstractMQTTDiscovery { HandlerConfiguration handlerConfig = new HandlerConfiguration(haID.baseTopic, topics); properties = handlerConfig.appendToProperties(properties); properties = config.appendToProperties(properties); + properties.put("deviceId", thingID); // Because we need the new properties map with the updated "components" list results.put(thingUID.getAsString(), - DiscoveryResultBuilder.create(thingUID).withProperties(properties).withRepresentationProperty(thingID) - .withBridge(connectionBridge).withLabel(config.getThingName() + " (" + componentNames + ")") - .build()); + DiscoveryResultBuilder.create(thingUID).withProperties(properties) + .withRepresentationProperty("deviceId").withBridge(connectionBridge) + .withLabel(config.getThingName() + " (" + componentNames + ")").build()); } protected void publishResults() {