diff --git a/README.md b/README.md index 67685cbb..75943126 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,8 @@ This adapter uses Sentry libraries to automatically report exceptions and code e ## Changelog ! Note that missing version entries are typically dependency updates for improved security. +### 0.2.3 (2023-08-27) +* (HombachC) fix error in 0.2.2 in start conditions of adapter ### 0.2.2 (2023-08-24) * (HombachC) reducing polls at Tibber server by precheck of known data * (HombachC) code optimizations diff --git a/build/lib/tibberAPICaller.js b/build/lib/tibberAPICaller.js index 2211c56f..db5c6087 100644 --- a/build/lib/tibberAPICaller.js +++ b/build/lib/tibberAPICaller.js @@ -58,7 +58,7 @@ class TibberAPICaller extends tibberHelper_1.TibberHelper { const exJSON = await this.getStateValue(`Homes.${this.currentHomeId}.PricesToday.json`); const exPricesToday = JSON.parse(exJSON); let exDate = null; - if (exPricesToday[2] && exPricesToday[2].startsAt) { + if (Array.isArray(exPricesToday) && exPricesToday[2] && exPricesToday[2].startsAt) { exDate = new Date(exPricesToday[2].startsAt); } const heute = new Date(); @@ -83,7 +83,7 @@ class TibberAPICaller extends tibberHelper_1.TibberHelper { const exJSON = await this.getStateValue(`Homes.${this.currentHomeId}.PricesTomorrow.json`); const exPricesTomorrow = JSON.parse(exJSON); let exDate = null; - if (exPricesTomorrow[2] && exPricesTomorrow[2].startsAt) { + if (Array.isArray(exPricesTomorrow) && exPricesTomorrow[2] && exPricesTomorrow[2].startsAt) { exDate = new Date(exPricesTomorrow[2].startsAt); } const morgen = new Date(); diff --git a/build/lib/tibberAPICaller.js.map b/build/lib/tibberAPICaller.js.map index b8be1586..1c0cc17e 100644 --- a/build/lib/tibberAPICaller.js.map +++ b/build/lib/tibberAPICaller.js.map @@ -1 +1 @@ -{"version":3,"file":"tibberAPICaller.js","sourceRoot":"","sources":["../../src/lib/tibberAPICaller.ts"],"names":[],"mappings":";;;AACA,2CAAkD;AAKlD,iDAA8C;AAE9C,MAAa,eAAgB,SAAQ,2BAAY;IAKhD,YAAY,YAAqB,EAAE,OAA8B;QA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,WAAW,CAAC,CAAC;SACnF;QACD,IAAI,WAAW,CAAC,OAAO,EAAE;YACxB,IAAI,CAAC,YAAY,CAAC,iBAAiB,GAAG,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;SACvE;IACF,CAAC;IAEO,gBAAgB,CAAC,iBAAyB,EAAE,WAAyB;QAC5E,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,aAAa,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;QAC9G,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,aAAa,EAAE,iBAAiB,EAAE,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjH,CAAC;CACD;AArKD,0CAqKC"} \ No newline at end of file diff --git a/io-package.json b/io-package.json index 5d845f18..d70d3f8d 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,21 @@ { "common": { "name": "tibberlink", - "version": "0.2.2", + "version": "0.2.3", "news": { + "0.2.3": { + "en": "fix error in 0.2.2 in start conditions of adapter", + "de": "korrigiert Fehler in 0.2.2 bei Startbedingungen des Adapters", + "ru": "исправить ошибку в 0.2.2 в начальных условиях адаптера", + "pt": "corrigir erro em 0,2.2 em condições de início do adaptador", + "nl": "herstel in 0.2.2 in de start voorwaarden van adapter", + "fr": "corriger l'erreur dans 0.2.2 dans les conditions de démarrage de l'adaptateur", + "it": "errore di correzione in 0.2.2 in condizioni di inizio dell'adattatore", + "es": "error de fijación en 0.2.2 en las condiciones de inicio del adaptador", + "pl": "ustępowanie błędów 0,2 w warunkach startowych", + "uk": "виправити помилку в 0.2.2 в початкових умовах адаптера", + "zh-cn": "f 在适应人员开始的条件下,在0.2.2年内出现错误" + }, "0.2.2": { "en": "reducing polls at Tibber server by precheck of known data, code optimizations, fix config screen (#55)", "de": "Reduktion von Anfragen am Tibber-Server durch Vorprüfung bekannter Daten, Codeoptimierungen, Fix Config-Bildschirm (#55)", diff --git a/package.json b/package.json index afb7c0d3..4a7c8cc4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iobroker.tibberlink", - "version": "0.2.2", + "version": "0.2.3", "description": "links tibber API data to be used in ioBroker", "author": { "name": "Hombach", diff --git a/src/lib/tibberAPICaller.ts b/src/lib/tibberAPICaller.ts index f7da5eea..9955a6fe 100644 --- a/src/lib/tibberAPICaller.ts +++ b/src/lib/tibberAPICaller.ts @@ -69,7 +69,7 @@ export class TibberAPICaller extends TibberHelper { const exJSON = await this.getStateValue(`Homes.${this.currentHomeId}.PricesToday.json`); const exPricesToday: IPrice[] = JSON.parse(exJSON); let exDate: Date | null = null; - if (exPricesToday[2] && exPricesToday[2].startsAt) { + if(Array.isArray(exPricesToday) && exPricesToday[2] && exPricesToday[2].startsAt) { exDate = new Date(exPricesToday[2].startsAt); } const heute = new Date(); @@ -94,7 +94,7 @@ export class TibberAPICaller extends TibberHelper { const exJSON = await this.getStateValue(`Homes.${this.currentHomeId}.PricesTomorrow.json`); const exPricesTomorrow: IPrice[] = JSON.parse(exJSON); let exDate: Date | null = null; - if (exPricesTomorrow[2] && exPricesTomorrow[2].startsAt) { + if (Array.isArray(exPricesTomorrow) && exPricesTomorrow[2] && exPricesTomorrow[2].startsAt) { exDate = new Date(exPricesTomorrow[2].startsAt); } const morgen = new Date();