mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[verisure] Avoid updates duplication after communication errors (#13652)
Avoid registering several times the same device status listener. It is called by the thing handler each time the bridge status changed to ONLINE. Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
f184e4e88f
commit
c81790cebf
@ -27,8 +27,8 @@ import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
@ -82,7 +82,7 @@ public class VerisureSession {
|
||||
private final Map<String, VerisureThingHandler<?>> verisureHandlers = new ConcurrentHashMap<>();
|
||||
private final Logger logger = LoggerFactory.getLogger(VerisureSession.class);
|
||||
private final Gson gson = new Gson();
|
||||
private final List<DeviceStatusListener<VerisureThingDTO>> deviceStatusListeners = new CopyOnWriteArrayList<>();
|
||||
private final Set<DeviceStatusListener<VerisureThingDTO>> deviceStatusListeners = ConcurrentHashMap.newKeySet();
|
||||
private final Map<BigDecimal, VerisureInstallation> verisureInstallations = new ConcurrentHashMap<>();
|
||||
private static final List<String> APISERVERLIST = Arrays.asList("https://m-api01.verisure.com",
|
||||
"https://m-api02.verisure.com");
|
||||
|
Loading…
Reference in New Issue
Block a user