* [miio] Update channels only if they are linked With introduction of miot devices with enormous amount of channels refreshes can become slow. With this change only relevant updates are done. Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>pull/9326/head
parent
b2efdd4356
commit
3e4466d8f1
|
@ -291,6 +291,11 @@ public class MiIoBasicHandler extends MiIoAbstractHandler {
|
||||||
int maxProperties = device.getDevice().getMaxProperties();
|
int maxProperties = device.getDevice().getMaxProperties();
|
||||||
JsonArray getPropString = new JsonArray();
|
JsonArray getPropString = new JsonArray();
|
||||||
for (MiIoBasicChannel miChannel : refreshList) {
|
for (MiIoBasicChannel miChannel : refreshList) {
|
||||||
|
if (!isLinked(miChannel.getChannel())) {
|
||||||
|
logger.debug("Skip refresh of channel {} for {} as it is not linked", miChannel.getChannel(),
|
||||||
|
getThing().getUID());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
JsonElement property;
|
JsonElement property;
|
||||||
if (miChannel.isMiOt()) {
|
if (miChannel.isMiOt()) {
|
||||||
JsonObject json = new JsonObject();
|
JsonObject json = new JsonObject();
|
||||||
|
|
Loading…
Reference in New Issue