[miio] fix discovery issue when for devices with dot (#10880)

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
This commit is contained in:
Marcel 2021-06-20 14:10:48 +02:00 committed by GitHub
parent ae4ac7d36c
commit 8d39e5b2ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -233,7 +233,7 @@ public class MiIoDiscovery extends AbstractDiscoveryService {
}
private void submitDiscovery(String ip, String token, String id, String label, String country, boolean isOnline) {
ThingUID uid = new ThingUID(THING_TYPE_MIIO, id);
ThingUID uid = new ThingUID(THING_TYPE_MIIO, id.replace(".", "_"));
DiscoveryResultBuilder dr = DiscoveryResultBuilder.create(uid).withProperty(PROPERTY_HOST_IP, ip)
.withProperty(PROPERTY_DID, id);
if (IGNORED_TOKENS.contains(token)) {