iobroker.accuweather
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -9,2 +9,5 @@ # Changelog | ||
## v1.1.3 (2020-03-04) | ||
Minor updates for compact mode | ||
## v1.1.0 (2019-11-09) | ||
@@ -11,0 +14,0 @@ Summary channel added to support automatic weather device detection by type-detector |
{ | ||
"common": { | ||
"name": "accuweather", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"news": { | ||
"1.1.2": { | ||
"1.1.3": { | ||
"en": "Minor updates for compact mode", | ||
@@ -8,0 +8,0 @@ "de": "Kleinere Updates für den Kompaktmodus", |
13
main.js
@@ -13,3 +13,6 @@ "use strict"; | ||
var updateInterval = null; | ||
var timeout1 = null; | ||
var timeout2 = null; | ||
// Load your modules here, e.g.: | ||
@@ -174,3 +177,3 @@ // const fs = require("fs"); | ||
//this.log.debug("Current: " + key + ": " + typeof json[key]); | ||
if (typeof json[key] !== "object" && json[key] !== null) { | ||
if (typeof json[key] !== "object" || json[key]==null) { | ||
this.setState("Current." + key, { val: json[key], ack: true }); | ||
@@ -306,5 +309,5 @@ | ||
const cdt = new Date(); | ||
if ((cdt.getHours() === 7 || cdt.getHours() === 20) && cdt.getMinutes() <= 5) { setTimeout(() => { _this.requst5Days(); }, Math.random() * 10000 + 1); } | ||
if (cdt.getMinutes() <= 5 && cdt.getMinutes() > 0) { setTimeout(() => { _this.requstCurrent(); }, Math.random() * 10000 + 1); } | ||
if ((cdt.getHours() === 6 || cdt.getHours() === 12 || cdt.getHours() === 18 || cdt.getHours() === 0) && cdt.getMinutes() <= 5) { setTimeout(() => { _this.requst12Hours(); }, Math.random() * 10000 + 1); } | ||
if ((cdt.getHours() === 7 || cdt.getHours() === 20) && cdt.getMinutes() <= 5) { timeout1 = setTimeout(() => { _this.requst5Days(); }, Math.random() * 10000 + 1); } | ||
if (cdt.getMinutes() <= 5 && cdt.getMinutes() > 0) { timeout2 = setTimeout(() => { _this.requstCurrent(); }, Math.random() * 10000 + 1); } | ||
if ((cdt.getHours() === 6 || cdt.getHours() === 12 || cdt.getHours() === 18 || cdt.getHours() === 0) && cdt.getMinutes() <= 5) { timeout1 = setTimeout(() => { _this.requst12Hours(); }, Math.random() * 10000 + 1); } | ||
@@ -372,2 +375,4 @@ }, 300000); | ||
clearInterval(updateInterval); | ||
clearTimeout(timeout1); | ||
clearTimeout(timeout2); | ||
callback(); | ||
@@ -374,0 +379,0 @@ } catch (e) { |
{ | ||
"name": "iobroker.accuweather", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Weather forecast using AccuWeather API", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -39,3 +39,3 @@ ![Logo](admin/accuweather.png) | ||
### 1.1.2 | ||
### 1.1.3 | ||
* (algar42) Minor updates for compact mode | ||
@@ -42,0 +42,0 @@ |
118061
2455