From 6a29f7d5c07699d4cd465f87cf929a018187553e Mon Sep 17 00:00:00 2001 From: baerengraben Date: Sat, 22 May 2021 09:58:19 +0200 Subject: [PATCH] https://github.com/baerengraben/ioBroker.swiss-weather-api/issues/32 --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 391dd30..47847d4 100644 --- a/main.js +++ b/main.js @@ -103,11 +103,11 @@ function doIt(self) { if (err) { self.log.error('DNS Resolve Failed for api.srgssr.ch: ' + err.message + ' Is there an internet connection?'); self.log.error('Retrying in 10min...'); - //todo: set Status of adapter to yellow - self.info.connection = false; + self.setState('info.connection', false, true); setTimeout(doIt, 10 * 60000, self); } else { self.log.debug('Successfull DNS resolve for api.srgssr.ch: ' + JSON.stringify(addresses)); + self.setState('info.connection', true, true); var access_token; //Convert ConsumerKey and ConsumerSecret to base64 let data = self.config.ConsumerKey + ":" + self.config.ConsumerSecret;