mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
[systeminfo] Use the existing ChannelUID instance to check the linked state (#16553)
Signed-off-by: Jörg Sautter <joerg.sautter@gmx.net> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
parent
e8cff07721
commit
6d5b9668bc
@ -18,7 +18,6 @@ import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@ -403,10 +402,8 @@ public class SysteminfoHandler extends BaseThingHandler {
|
||||
if (!ThingStatus.ONLINE.equals(thing.getStatus())) {
|
||||
return;
|
||||
}
|
||||
Iterator<ChannelUID> iter = channels.iterator();
|
||||
while (iter.hasNext()) {
|
||||
ChannelUID channeUID = iter.next();
|
||||
if (isLinked(channeUID.getId())) {
|
||||
for (ChannelUID channeUID : channels) {
|
||||
if (isLinked(channeUID)) {
|
||||
publishDataForChannel(channeUID);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user