Skip to content

Commit

Permalink
0.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
hombach committed Aug 27, 2023
1 parent 17489df commit 651d2ee
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions build/lib/tibberAPICaller.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/lib/tibberAPICaller.js.map

Large diffs are not rendered by default.

15 changes: 14 additions & 1 deletion io-package.json
Original file line number Diff line number Diff line change
@@ -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)",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/lib/tibberAPICaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down

0 comments on commit 651d2ee

Please sign in to comment.