Skip to content

Commit

Permalink
3.4.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Hombach authored and Hombach committed Aug 9, 2024
1 parent f242b4d commit 46eaf97
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 23 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,10 @@ If you enjoyed this project — or just feeling generous, consider buying me a b

! Note that missing version entries are typically dependency updates for improved security.

### 3.4.7 (2024-08-09)
### 3.4.7 (2024-08-10)

- (HombachC) adapter checker detected optimizations (#493)
- (HombachC) improved error message (#490)

### 3.4.6 (2024-08-07)

Expand Down
6 changes: 1 addition & 5 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.

22 changes: 11 additions & 11 deletions io-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
"version": "3.4.7",
"news": {
"3.4.7": {
"en": "adapter checker detected optimizations (#493)",
"de": "Adapter-Checker erkannte Optimierungen (#493)",
"ru": "оптимизации, обнаруженные проверяющим адаптера (#493)",
"pt": "otimizações detectadas pelo verificador de adaptadores (#493)",
"nl": "door adapter checker gedetecteerde optimalisaties (#493)",
"fr": "optimisations détectées par le vérificateur d'adaptateurs (#493)",
"it": "ottimizzazioni rilevate dal controllo dell'adattatore (#493)",
"es": "optimizaciones detectadas por el verificador de adaptadores (#493)",
"pl": "optymalizacje wykryte przez sprawdzanie adaptera (#493)",
"uk": "оптимізації, виявлені перевіряючим адаптера (#493)",
"zh-cn": "适配器检查器检测到的优化 (#493)"
"en": "adapter checker detected optimizations (#493)\nimproved error message (#490)",
"de": "Adapter-Checker erkannte Optimierungen (#493)\nverbesserte Fehlermeldung (#490)",
"ru": "оптимизации, обнаруженные проверяющим адаптера (#493)\nулучшенное сообщение об ошибке (#490)",
"pt": "otimizações detectadas pelo verificador de adaptadores (#493)\nmensagem de erro aprimorada (#490)",
"nl": "door adapter checker gedetecteerde optimalisaties (#493)\nverbeterde foutmelding (#490)",
"fr": "optimisations détectées par le vérificateur d'adaptateurs (#493)\nmessage d'erreur amélioré (#490)",
"it": "ottimizzazioni rilevate dal controllo dell'adattatore (#493)\nmessaggio di errore migliorato (#490)",
"es": "optimizaciones detectadas por el verificador de adaptadores (#493)\nmensaje de error mejorado (#490)",
"pl": "optymalizacje wykryte przez sprawdzanie adaptera (#493)\nulepszona wiadomość o błędzie (#490)",
"uk": "оптимізації, виявлені перевіряючим адаптера (#493)\nпокращене повідомлення про помилку (#490)",
"zh-cn": "适配器检查器检测到的优化 (#493)\n改进的错误消息 (#490)"
},
"3.4.6": {
"en": "Catch wrong OBIS Codes, probably caused by Pulse communication errors",
Expand Down
6 changes: 1 addition & 5 deletions src/lib/tibberAPICaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,9 @@ export class TibberAPICaller extends TibberHelper {
today.setHours(0, 0, 0, 0); // sets clock to 0:00
if (!exDate || exDate <= today || forceUpdate) {
const pricesToday = await this.tibberQuery.getTodaysEnergyPrices(homeId);
// POTENTIAL 2.3.1 better error logging
if (!(Array.isArray(pricesToday) && pricesToday.length > 0 && pricesToday[2] && pricesToday[2].total)) {
throw new Error(`Got invalid data structure from Tibber`);
throw new Error(`Got invalid data structure from Tibber [you might not have a valid (or fully confirmed) contract]`);
}
// WIP
this.adapter.log.debug(`Got prices today from tibber api: ${JSON.stringify(pricesToday)} Force: ${forceUpdate}`);
this.checkAndSetValue(this.getStatePrefix(homeId, "PricesToday", "json"), JSON.stringify(pricesToday), "The prices today as json"); // write also it might be empty
this.fetchPriceAverage(homeId, `PricesToday.average`, pricesToday);
Expand Down Expand Up @@ -363,14 +361,12 @@ export class TibberAPICaller extends TibberHelper {
];
for (const { type, state, numCons, description } of resolutions) {
if (numCons && numCons > 0) {
//WiP #405 change call to get also obsolete data
let consumption: IConsumption[];
if (this.adapter.config.UseObsoleteStats) {
consumption = await this.getConsumptionObs(type, numCons, homeID);
} else {
consumption = await this.tibberQuery.getConsumption(type, numCons, homeID);
}
//WiP #405
this.checkAndSetValue(
this.getStatePrefix(homeID, `Consumption`, state),
JSON.stringify(consumption),
Expand Down

0 comments on commit 46eaf97

Please sign in to comment.