iobroker.pv-notifications 1.2.16 → 1.2.18
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 +3 -0
- package/io-package.json +14 -27
- package/main.js +14 -31
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -344,6 +344,9 @@ sadam6752@gmail.com
|
|
|
344
344
|
### **WORK IN PROGRESS**
|
|
345
345
|
-->
|
|
346
346
|
|
|
347
|
+
### 1.2.17 (2026-03-15)
|
|
348
|
+
* (FIX) Removed old versions from common.news to comply with W1032 (maximum 7 versions)
|
|
349
|
+
|
|
347
350
|
### 1.2.16 (2026-03-14)
|
|
348
351
|
* (FIX) Removed empty line in battery full message for improved formatting
|
|
349
352
|
|
package/io-package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "pv-notifications",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.18",
|
|
5
5
|
"titleLang": {
|
|
6
6
|
"en": "PV Notifications",
|
|
7
7
|
"de": "PV-Benachrichtigungen",
|
|
@@ -29,6 +29,19 @@
|
|
|
29
29
|
"zh-cn": "发送 Telegram 通知用于 PV 电池状态"
|
|
30
30
|
},
|
|
31
31
|
"news": {
|
|
32
|
+
"1.2.17": {
|
|
33
|
+
"en": "Removed old versions from common.news to comply with W1032 (maximum 7 versions)",
|
|
34
|
+
"de": "Alte Versionen aus common.news entfernt zur Einhaltung von W1032 (maximal 7 Versionen)",
|
|
35
|
+
"ru": "Удалены старые версии из common.news для соответствия W1032 (максимум 7 версий)",
|
|
36
|
+
"pt": "Versões antigas removidas de common.news para cumprir W1032 (máximo 7 versões)",
|
|
37
|
+
"nl": "Oude versies verwijderd uit common.news om te voldoen aan W1032 (maximaal 7 versies)",
|
|
38
|
+
"fr": "Anciennes versions supprimées de common.news pour respecter W1032 (maximum 7 versions)",
|
|
39
|
+
"it": "Rimosse vecchie versioni da common.news per rispettare W1032 (massimo 7 versioni)",
|
|
40
|
+
"es": "Versiones antiguas eliminadas de common.news para cumplir con W1032 (máximo 7 versiones)",
|
|
41
|
+
"pl": "Usunięto stare wersje z common.news zgodnie z W1032 (maksymalnie 7 wersji)",
|
|
42
|
+
"uk": "Видалено старі версії з common.news для відповідності W1032 (максимум 7 версій)",
|
|
43
|
+
"zh-cn": "已从 common.news 中删除旧版本以符合 W1032(最多 7 个版本)"
|
|
44
|
+
},
|
|
32
45
|
"1.2.16": {
|
|
33
46
|
"en": "Removed empty line in battery full message for improved formatting",
|
|
34
47
|
"de": "Leere Zeile in Batterie VOLL Nachricht für bessere Formatierung entfernt",
|
|
@@ -106,32 +119,6 @@
|
|
|
106
119
|
"pl": "Naprawiono statystyki dzienne: zużycie własne nie może być ujemne (Math.max), dodano pogodę dzisiaj do statystyk dziennych",
|
|
107
120
|
"uk": "Виправлено денну статистику: власне споживання не може бути від'ємним (Math.max), додано погоду сьогодні до денної статистики",
|
|
108
121
|
"zh-cn": "已修复每日统计:自用电量不能为负数(Math.max),已添加今日天气到每日统计"
|
|
109
|
-
},
|
|
110
|
-
"1.2.10": {
|
|
111
|
-
"en": "Fixed W4040/W4042: Updated schema definitions in .vscode/settings.json (fileMatch without leading slashes, URLs with /master/)",
|
|
112
|
-
"de": "W4040/W4042 behoben: Schema-Definitionen in .vscode/settings.json aktualisiert (fileMatch ohne führende Slashes, URLs mit /master/)",
|
|
113
|
-
"ru": "Исправлено W4040/W4042: обновлены определения схем в .vscode/settings.json (fileMatch без начальных слешей, URL с /master/)",
|
|
114
|
-
"pt": "Corrigido W4040/W4042: Atualizadas definições de esquema em .vscode/settings.json (fileMatch sem barras iniciais, URLs com /master/)",
|
|
115
|
-
"nl": "W4040/W4042 opgelost: Schema-definities bijgewerkt in .vscode/settings.json (fileMatch zonder voorloopslashes, URL's met /master/)",
|
|
116
|
-
"fr": "Correction W4040/W4042 : Définitions de schéma mises à jour dans .vscode/settings.json (fileMatch sans barres obliques, URLs avec /master/)",
|
|
117
|
-
"it": "Corretto W4040/W4042: Aggiornate definizioni di schema in .vscode/settings.json (fileMatch senza barre iniziali, URL con /master/)",
|
|
118
|
-
"es": "Corregido W4040/W4042: Actualizadas definiciones de esquema en .vscode/settings.json (fileMatch sin barras iniciales, URLs con /master/)",
|
|
119
|
-
"pl": "Naprawiono W4040/W4042: Zaktualizowano definicje schematu w .vscode/settings.json (fileMatch bez wiodących ukośników, adresy URL z /master/)",
|
|
120
|
-
"uk": "Виправлено W4040/W4042: Оновлено визначення схеми в .vscode/settings.json (fileMatch без початкових скісних рисок, URL-адреси з /master/)",
|
|
121
|
-
"zh-cn": "已修复 W4040/W4042:已更新 .vscode/settings.json 中的架构定义(fileMatch 无前导斜杠,URL 使用 /master/)"
|
|
122
|
-
},
|
|
123
|
-
"1.2.9": {
|
|
124
|
-
"en": "Fixed ESLint formatting issues (75 prettier/prettier errors auto-fixed with lint:fix)",
|
|
125
|
-
"de": "ESLint-Formatierungsfehler behoben (75 prettier/prettier Fehler mit lint:fix automatisch korrigiert)",
|
|
126
|
-
"ru": "Исправлены ошибки форматирования ESLint (75 ошибок prettier/prettier автоматически исправлены через lint:fix)",
|
|
127
|
-
"pt": "Corrigidos problemas de formatação ESLint (75 erros prettier/prettier corrigidos automaticamente com lint:fix)",
|
|
128
|
-
"nl": "ESLint-opmaakproblemen opgelost (75 prettier/prettier-fouten automatisch hersteld met lint:fix)",
|
|
129
|
-
"fr": "Correction des problèmes de formatage ESLint (75 erreurs prettier/prettier corrigées automatiquement avec lint:fix)",
|
|
130
|
-
"it": "Corretti problemi di formattazione ESLint (75 errori prettier/prettier corretti automaticamente con lint:fix)",
|
|
131
|
-
"es": "Corregidos problemas de formato ESLint (75 errores prettier/prettier corregidos automáticamente con lint:fix)",
|
|
132
|
-
"pl": "Naprawiono problemy z formatowaniem ESLint (75 błędów prettier/prettier automatycznie naprawionych za pomocą lint:fix)",
|
|
133
|
-
"uk": "Виправлено проблеми з форматуванням ESLint (75 помилок prettier/prettier автоматично виправлено за допомогою lint:fix)",
|
|
134
|
-
"zh-cn": "已修复 ESLint 格式化问题(75 个 prettier/prettier 错误已通过 lint:fix 自动修复)"
|
|
135
122
|
}
|
|
136
123
|
},
|
|
137
124
|
"authors": [
|
package/main.js
CHANGED
|
@@ -548,13 +548,6 @@ class PvNotifications extends utils.Adapter {
|
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
550
|
|
|
551
|
-
/**
|
|
552
|
-
* Is called when adapter receives configuration.
|
|
553
|
-
*/
|
|
554
|
-
async onConfigChange() {
|
|
555
|
-
this.log.info('Configuration changed');
|
|
556
|
-
}
|
|
557
|
-
|
|
558
551
|
/**
|
|
559
552
|
* Is called if a subscribed state changes
|
|
560
553
|
*
|
|
@@ -580,7 +573,7 @@ class PvNotifications extends utils.Adapter {
|
|
|
580
573
|
|
|
581
574
|
// Process battery SOC change
|
|
582
575
|
if (id === this.config.batterySOC) {
|
|
583
|
-
this.onBatterySOCChange(state.val);
|
|
576
|
+
await this.onBatterySOCChange(state.val);
|
|
584
577
|
return;
|
|
585
578
|
}
|
|
586
579
|
|
|
@@ -711,7 +704,10 @@ class PvNotifications extends utils.Adapter {
|
|
|
711
704
|
}
|
|
712
705
|
// === Intermediate-Stufen (nur wenn nicht voll/leer und nicht nachts und nicht in Ruhezeit) ===
|
|
713
706
|
if (soc !== this.config.thresholdFull && soc !== this.config.thresholdEmpty) {
|
|
714
|
-
const intermediateSteps = this.config.intermediateSteps
|
|
707
|
+
const intermediateSteps = (this.config.intermediateSteps || '20,40,60,80')
|
|
708
|
+
.split(',')
|
|
709
|
+
.map(s => parseInt(s.trim()))
|
|
710
|
+
.filter(n => !isNaN(n));
|
|
715
711
|
|
|
716
712
|
// Prüfe Intermediate-Stufen - nur außerhalb der Nachtzeit und Ruhezeit
|
|
717
713
|
const allowIntermediate = (!nightTime || !nightModeActive) && (!quietTime || !quietModeActive);
|
|
@@ -1093,10 +1089,10 @@ class PvNotifications extends utils.Adapter {
|
|
|
1093
1089
|
direction === 'up'
|
|
1094
1090
|
? this.systemLang === 'ru'
|
|
1095
1091
|
? '✅ Батарея заряжается'
|
|
1096
|
-
: '✅
|
|
1092
|
+
: '✅ Battery charging'
|
|
1097
1093
|
: this.systemLang === 'ru'
|
|
1098
1094
|
? '⚠️ Батарея разряжается'
|
|
1099
|
-
: '⚠️
|
|
1095
|
+
: '⚠️ Battery discharging';
|
|
1100
1096
|
|
|
1101
1097
|
// Einheitliche Nachricht für alle Stufen (20, 40, 60, 80)
|
|
1102
1098
|
const batteryAt = this.translate('Battery at');
|
|
@@ -1467,23 +1463,6 @@ ${statusText}
|
|
|
1467
1463
|
);
|
|
1468
1464
|
}
|
|
1469
1465
|
|
|
1470
|
-
/**
|
|
1471
|
-
* State-Wert holen
|
|
1472
|
-
*
|
|
1473
|
-
* @param {string} id - State ID
|
|
1474
|
-
*/
|
|
1475
|
-
getStateValue(id) {
|
|
1476
|
-
if (!id) {
|
|
1477
|
-
return 0;
|
|
1478
|
-
}
|
|
1479
|
-
try {
|
|
1480
|
-
const state = this.getState(id);
|
|
1481
|
-
return state && state.val !== null && state.val !== undefined ? state.val : 0;
|
|
1482
|
-
} catch {
|
|
1483
|
-
return 0;
|
|
1484
|
-
}
|
|
1485
|
-
}
|
|
1486
|
-
|
|
1487
1466
|
/**
|
|
1488
1467
|
* Runde Zahl auf Dezimalstellen
|
|
1489
1468
|
*
|
|
@@ -1540,7 +1519,7 @@ ${statusText}
|
|
|
1540
1519
|
}, 60000); // Jede Minute ausführen
|
|
1541
1520
|
|
|
1542
1521
|
this.log.info(
|
|
1543
|
-
`
|
|
1522
|
+
`Scheduled tasks started (Daily: ${this.config.statsDayTime}, Weekly: day ${this.config.statsWeekDay} at ${this.config.statsWeekTime})`,
|
|
1544
1523
|
);
|
|
1545
1524
|
}
|
|
1546
1525
|
|
|
@@ -1899,8 +1878,12 @@ ${statusText}
|
|
|
1899
1878
|
try {
|
|
1900
1879
|
// Wetter heute
|
|
1901
1880
|
if (this.config.weatherTodayText || this.config.weatherTodayTemp) {
|
|
1902
|
-
const weatherTodayTextState =
|
|
1903
|
-
|
|
1881
|
+
const weatherTodayTextState = this.config.weatherTodayText
|
|
1882
|
+
? await this.getForeignStateAsync(this.config.weatherTodayText)
|
|
1883
|
+
: null;
|
|
1884
|
+
const weatherTodayState = this.config.weatherTodayTemp
|
|
1885
|
+
? await this.getForeignStateAsync(this.config.weatherTodayTemp)
|
|
1886
|
+
: null;
|
|
1904
1887
|
|
|
1905
1888
|
const weatherTodayText =
|
|
1906
1889
|
weatherTodayTextState && weatherTodayTextState.val !== null ? weatherTodayTextState.val : null;
|