[miio] delay refresh to avoid devices not ready yet (#8838)

* [miio] delay refresh to avoid devices not ready yet

Delay refresh after command is send as some devices are not ready yet
with the execution and will report wrong status.
This is confusing to the users.

Related forum topic:
https://community.openhab.org/t/xiaomi-mi-air-purifier-xiaomi-mi-io/34840/300

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

* [miio] remove change from PR
This commit is contained in:
Marcel 2020-10-24 03:45:03 +02:00 committed by GitHub
parent e70dfd7450
commit 788ca22724
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -222,7 +222,9 @@ public class MiIoBasicHandler extends MiIoAbstractHandler {
}
}
updateDataCache.invalidateValue();
scheduler.schedule(() -> {
updateData();
}, 3000, TimeUnit.MILLISECONDS);
} else {
logger.debug("Actions not loaded yet");
}