iobroker.pv-notifications 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -339,6 +339,10 @@ sadam6752@gmail.com
339
339
  ### **WORK IN PROGRESS**
340
340
  -->
341
341
 
342
+ ### 1.2.2 (2026-03-02)
343
+
344
+ * (FIX) Weekly statistics: Now uses weeklyProduction/weeklyConsumption/weeklyFeedIn/weeklyGridPower fields instead of daily values
345
+
342
346
  ### 1.2.1 (2026-03-01)
343
347
 
344
348
  * (FIX) Added size attributes (xs, xl) for night mode and quiet mode fields in admin UI (E5507 fix)
package/io-package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "pv-notifications",
4
- "version": "1.2.1",
4
+ "version": "1.2.2",
5
5
  "titleLang": {
6
6
  "en": "PV Notifications",
7
7
  "de": "PV-Benachrichtigungen",
@@ -29,6 +29,11 @@
29
29
  "zh-cn": "发送 Telegram 通知用于 PV 电池状态"
30
30
  },
31
31
  "news": {
32
+ "1.2.2": {
33
+ "en": "Fixed weekly statistics: Now uses weeklyProduction/weeklyConsumption/weeklyFeedIn/weeklyGridPower fields instead of daily values",
34
+ "de": "Wochenstatistik fixiert: Verwendet jetzt weeklyProduction/weeklyConsumption/weeklyFeedIn/weeklyGridPower Felder statt Tageswerten",
35
+ "ru": "Исправлена недельная статистика: теперь используются поля weeklyProduction/weeklyConsumption/weeklyFeedIn/weeklyGridPower вместо дневных значений"
36
+ },
32
37
  "1.2.1": {
33
38
  "en": "Added size attributes (xs, xl) for night mode and quiet mode fields in admin UI",
34
39
  "de": "Größenattribute (xs, xl) für Nachtmodus und Ruhemodus-Felder im Admin-UI hinzugefügt",
@@ -205,7 +210,10 @@
205
210
  "monthlyProduction": "",
206
211
  "monthlyConsumption": "",
207
212
  "monthlyFeedIn": "",
208
- "monthlyGridPower": ""
213
+ "monthlyGridPower": "",
214
+ "weatherEnabled": true,
215
+ "weatherInIntermediate": true,
216
+ "weatherInDailyStats": true
209
217
  },
210
218
  "objects": [
211
219
  {
package/main.js CHANGED
@@ -1412,15 +1412,17 @@ ${statusText}`;
1412
1412
  this.log.info('Auto-saving weekly statistics (Sunday 23:55, before sourceanalytix reset)');
1413
1413
 
1414
1414
  // Aktuelle Daten aus externen States lesen (direkter Zugriff)
1415
- const totalProd = await this.getForeignStateAsync(this.config.totalProduction);
1416
- const consumption = await this.getForeignStateAsync(this.config.consumption);
1417
- const feedIn = await this.getForeignStateAsync(this.config.feedIn);
1418
- const gridPower = await this.getForeignStateAsync(this.config.gridPower);
1419
-
1420
- this.stats.lastWeekProduction = totalProd && totalProd.val !== null ? totalProd.val : 0;
1421
- this.stats.lastWeekConsumption = consumption && consumption.val !== null ? consumption.val : 0;
1422
- this.stats.lastWeekFeedIn = feedIn && feedIn.val !== null ? feedIn.val : 0;
1423
- this.stats.lastWeekGridPower = gridPower && gridPower.val !== null ? gridPower.val : 0;
1415
+ // WICHTIG: weeklyProduction/weeklyConsumption/etc. verwenden (sourceanalytix Wochenwerte)
1416
+ // NICHT totalProduction/consumption/etc. (das sind Tageswerte!)
1417
+ const weeklyProd = await this.getForeignStateAsync(this.config.weeklyProduction);
1418
+ const weeklyConsumption = await this.getForeignStateAsync(this.config.weeklyConsumption);
1419
+ const weeklyFeedIn = await this.getForeignStateAsync(this.config.weeklyFeedIn);
1420
+ const weeklyGridPower = await this.getForeignStateAsync(this.config.weeklyGridPower);
1421
+
1422
+ this.stats.lastWeekProduction = weeklyProd && weeklyProd.val !== null ? weeklyProd.val : 0;
1423
+ this.stats.lastWeekConsumption = weeklyConsumption && weeklyConsumption.val !== null ? weeklyConsumption.val : 0;
1424
+ this.stats.lastWeekFeedIn = weeklyFeedIn && weeklyFeedIn.val !== null ? weeklyFeedIn.val : 0;
1425
+ this.stats.lastWeekGridPower = weeklyGridPower && weeklyGridPower.val !== null ? weeklyGridPower.val : 0;
1424
1426
  this.stats.lastWeekFullCycles = this.stats.weekFullCycles;
1425
1427
  this.stats.lastWeekEmptyCycles = this.stats.weekEmptyCycles;
1426
1428
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.pv-notifications",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "PV-Anlage Batterie-Status Telegram Benachrichtigungen",
5
5
  "author": {
6
6
  "name": "Alex1808 via LLM: Qwen",