private static final int DISCOVER_TIMEOUT_SECONDS = 5;
private final Logger logger = LoggerFactory.getLogger(NetatmoDiscoveryService.class);
private @Nullable ApiBridgeHandler handler;
- private boolean readFriends;
public NetatmoDiscoveryService() {
super(ModuleType.AS_SET.stream().filter(mt -> !SKIPPED_TYPES.contains(mt)).map(mt -> mt.thingTypeUID)
body.getElements().stream().forEach(homeCoach -> createThing(homeCoach, apiBridgeUID));
}
}
- if (readFriends) {
+ if (localHandler.getReadFriends()) {
WeatherApi weatherApi = localHandler.getRestManager(WeatherApi.class);
if (weatherApi != null) { // Search favorite stations
weatherApi.getFavoriteAndGuestStationsData().stream().filter(NAMain::isReadOnly)
public void setThingHandler(ThingHandler handler) {
if (handler instanceof ApiBridgeHandler) {
this.handler = (ApiBridgeHandler) handler;
- this.readFriends = ((ApiBridgeHandler) handler).getReadFriends();
}
}