iobroker.pv-notifications 1.1.1 → 1.1.3
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 +10 -4
- package/admin/i18n/de/translations.json +6 -0
- package/admin/i18n/en/translations.json +6 -0
- package/admin/i18n/ru/translations.json +6 -0
- package/admin/jsonConfig.json +29 -0
- package/io-package.json +1 -1
- package/main.js +36 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -339,13 +339,19 @@ sadam6752@gmail.com
|
|
|
339
339
|
### **WORK IN PROGRESS**
|
|
340
340
|
-->
|
|
341
341
|
|
|
342
|
-
### 1.1.
|
|
342
|
+
### 1.1.3 (2026-03-01)
|
|
343
343
|
|
|
344
|
-
* (
|
|
344
|
+
* (ADD) Two separate checkboxes for weather data: 'weatherInIntermediate' and 'weatherInDailyStats'
|
|
345
|
+
* (ADD) Users can now choose where to show weather: in intermediate messages, daily statistics, or both
|
|
346
|
+
* (FIX) Weather data now respects individual checkbox settings
|
|
347
|
+
|
|
348
|
+
### 1.1.2 (2026-03-01)
|
|
345
349
|
|
|
346
|
-
|
|
350
|
+
* (FIX) Weather data now read correctly using getForeignStateAsync() instead of getStateValue()
|
|
347
351
|
|
|
348
|
-
|
|
352
|
+
### 1.1.1 (2026-03-01)
|
|
353
|
+
|
|
354
|
+
* (FIX) Intermediate messages: Flag reset condition changed from `> 2` to `>= 2` for proper 2% tolerance
|
|
349
355
|
|
|
350
356
|
### 1.0.93 (2026-02-27)
|
|
351
357
|
|
|
@@ -68,6 +68,12 @@
|
|
|
68
68
|
"label_monthlyStatsTime": "Uhrzeit",
|
|
69
69
|
"tooltip_monthlyStatsTime": "Format: HH:MM (z.B. 09:00)",
|
|
70
70
|
"header_weather": "Wetter (Optional)",
|
|
71
|
+
"label_weatherEnabled": "Wetterdaten in Nachrichten anzeigen",
|
|
72
|
+
"tooltip_weatherEnabled": "Wenn aktiviert, werden Wetterdaten in Tagesstatistik und Batterie-Status-Nachrichten angezeigt",
|
|
73
|
+
"label_weatherInIntermediate": "Intermediate-Stufen",
|
|
74
|
+
"tooltip_weatherInIntermediate": "Wetterdaten in Intermediate-Nachrichten (20%, 40%, 60%, 80%) anzeigen",
|
|
75
|
+
"label_weatherInDailyStats": "Tagesstatistik",
|
|
76
|
+
"tooltip_weatherInDailyStats": "Wetterdaten in Tagesstatistik (22:00) anzeigen",
|
|
71
77
|
"label_weatherTodayText": "Wetter heute",
|
|
72
78
|
"tooltip_weatherTodayText": "Z.B. daswetter.0.Day0.forecast.currentSymbol",
|
|
73
79
|
"label_weatherTodayTemp": "Temperatur heute (°C)",
|
|
@@ -68,6 +68,12 @@
|
|
|
68
68
|
"label_monthlyStatsTime": "Time",
|
|
69
69
|
"tooltip_monthlyStatsTime": "Format: HH:MM (e.g. 09:00)",
|
|
70
70
|
"header_weather": "Weather (Optional)",
|
|
71
|
+
"label_weatherEnabled": "Show weather data in messages",
|
|
72
|
+
"tooltip_weatherEnabled": "If enabled, weather data will be shown in daily statistics and battery status messages",
|
|
73
|
+
"label_weatherInIntermediate": "Intermediate levels",
|
|
74
|
+
"tooltip_weatherInIntermediate": "Show weather data in intermediate messages (20%, 40%, 60%, 80%)",
|
|
75
|
+
"label_weatherInDailyStats": "Daily statistics",
|
|
76
|
+
"tooltip_weatherInDailyStats": "Show weather data in daily statistics (22:00)",
|
|
71
77
|
"label_weatherTodayText": "Weather today",
|
|
72
78
|
"tooltip_weatherTodayText": "e.g. daswetter.0.Day0.forecast.currentSymbol",
|
|
73
79
|
"label_weatherTodayTemp": "Temperature today (°C)",
|
|
@@ -68,6 +68,12 @@
|
|
|
68
68
|
"label_monthlyStatsTime": "Время",
|
|
69
69
|
"tooltip_monthlyStatsTime": "Формат: ЧЧ:ММ (например, 09:00)",
|
|
70
70
|
"header_weather": "Погода (опционально)",
|
|
71
|
+
"label_weatherEnabled": "Показывать данные о погоде в сообщениях",
|
|
72
|
+
"tooltip_weatherEnabled": "Если включено, данные о погоде будут отображаться в дневной статистике и сообщениях о статусе батареи",
|
|
73
|
+
"label_weatherInIntermediate": "Промежуточные уровни",
|
|
74
|
+
"tooltip_weatherInIntermediate": "Показывать погоду в промежуточных сообщениях (20%, 40%, 60%, 80%)",
|
|
75
|
+
"label_weatherInDailyStats": "Дневная статистика",
|
|
76
|
+
"tooltip_weatherInDailyStats": "Показывать погоду в дневной статистике (22:00)",
|
|
71
77
|
"label_weatherTodayText": "Погода сегодня",
|
|
72
78
|
"tooltip_weatherTodayText": "Например: daswetter.0.Day0.forecast.currentSymbol",
|
|
73
79
|
"label_weatherTodayTemp": "Температура сегодня (°C)",
|
package/admin/jsonConfig.json
CHANGED
|
@@ -424,6 +424,35 @@
|
|
|
424
424
|
"md": 12,
|
|
425
425
|
"lg": 12
|
|
426
426
|
},
|
|
427
|
+
"weatherEnabled": {
|
|
428
|
+
"type": "checkbox",
|
|
429
|
+
"label": "label_weatherEnabled",
|
|
430
|
+
"sm": 12,
|
|
431
|
+
"md": 12,
|
|
432
|
+
"lg": 12,
|
|
433
|
+
"default": true,
|
|
434
|
+
"tooltip": "tooltip_weatherEnabled"
|
|
435
|
+
},
|
|
436
|
+
"weatherInIntermediate": {
|
|
437
|
+
"type": "checkbox",
|
|
438
|
+
"label": "label_weatherInIntermediate",
|
|
439
|
+
"sm": 6,
|
|
440
|
+
"md": 6,
|
|
441
|
+
"lg": 6,
|
|
442
|
+
"default": true,
|
|
443
|
+
"tooltip": "tooltip_weatherInIntermediate",
|
|
444
|
+
"disabled": "!weatherEnabled"
|
|
445
|
+
},
|
|
446
|
+
"weatherInDailyStats": {
|
|
447
|
+
"type": "checkbox",
|
|
448
|
+
"label": "label_weatherInDailyStats",
|
|
449
|
+
"sm": 6,
|
|
450
|
+
"md": 6,
|
|
451
|
+
"lg": 6,
|
|
452
|
+
"default": true,
|
|
453
|
+
"tooltip": "tooltip_weatherInDailyStats",
|
|
454
|
+
"disabled": "!weatherEnabled"
|
|
455
|
+
},
|
|
427
456
|
"weatherTodayText": {
|
|
428
457
|
"type": "objectId",
|
|
429
458
|
"label": "label_weatherTodayText",
|
package/io-package.json
CHANGED
package/main.js
CHANGED
|
@@ -977,9 +977,34 @@ class PvNotifications extends utils.Adapter {
|
|
|
977
977
|
const batteryAt = this.translate('Battery at');
|
|
978
978
|
const production = this.translate('Production');
|
|
979
979
|
|
|
980
|
-
|
|
980
|
+
let message = `🔋 ${batteryAt} ${soc}% (${currentKWh} kWh) ${trend}
|
|
981
981
|
⚡ ${production}: ${this.round(power)} W
|
|
982
982
|
${statusText}`;
|
|
983
|
+
|
|
984
|
+
// Wetter-Prognose für morgen hinzufügen (optional, nur wenn weatherInIntermediate aktiv)
|
|
985
|
+
if (this.config.weatherEnabled !== false && this.config.weatherInIntermediate !== false &&
|
|
986
|
+
(this.config.weatherTomorrowText || this.config.weatherTomorrow)) {
|
|
987
|
+
try {
|
|
988
|
+
const weatherTomorrowTextState = await this.getForeignStateAsync(this.config.weatherTomorrowText);
|
|
989
|
+
const weatherTomorrowState = await this.getForeignStateAsync(this.config.weatherTomorrow);
|
|
990
|
+
const tempTomorrowState = await this.getForeignStateAsync(this.config.weatherTomorrowTemp);
|
|
991
|
+
|
|
992
|
+
const weatherTomorrowText = weatherTomorrowTextState && weatherTomorrowTextState.val !== null ? weatherTomorrowTextState.val : null;
|
|
993
|
+
const weatherTomorrow = weatherTomorrowState && weatherTomorrowState.val !== null ? weatherTomorrowState.val : null;
|
|
994
|
+
const tempTomorrow = tempTomorrowState && tempTomorrowState.val !== null ? tempTomorrowState.val : null;
|
|
995
|
+
const tempText = tempTomorrow ? ` ${this.round(tempTomorrow, 1)}°C` : '';
|
|
996
|
+
|
|
997
|
+
const weatherText = weatherTomorrowText || weatherTomorrow;
|
|
998
|
+
if (weatherText) {
|
|
999
|
+
const weatherDesc = this.getWeatherDescription(weatherText);
|
|
1000
|
+
message += `\n\n🌤️ ${this.translate('Weather tomorrow')}: ${weatherDesc}${tempText}`;
|
|
1001
|
+
}
|
|
1002
|
+
} catch (e) {
|
|
1003
|
+
this.log.debug(`Weather data not available: ${e.message}`);
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
return message;
|
|
983
1008
|
}
|
|
984
1009
|
|
|
985
1010
|
/**
|
|
@@ -1017,12 +1042,17 @@ ${statusText}`;
|
|
|
1017
1042
|
🔌 ${this.translate('Feed-in')}: ${feedIn} kWh
|
|
1018
1043
|
⚡ ${this.translate('Grid consumption')}: ${gridPower} kWh`;
|
|
1019
1044
|
|
|
1020
|
-
// Wetter-Prognose für morgen hinzufügen
|
|
1021
|
-
if (this.config.
|
|
1045
|
+
// Wetter-Prognose für morgen hinzufügen (optional, nur wenn weatherInDailyStats aktiv)
|
|
1046
|
+
if (this.config.weatherEnabled !== false && this.config.weatherInDailyStats !== false &&
|
|
1047
|
+
(this.config.weatherTomorrowText || this.config.weatherTomorrow)) {
|
|
1022
1048
|
try {
|
|
1023
|
-
const
|
|
1024
|
-
const
|
|
1025
|
-
const
|
|
1049
|
+
const weatherTomorrowTextState = await this.getForeignStateAsync(this.config.weatherTomorrowText);
|
|
1050
|
+
const weatherTomorrowState = await this.getForeignStateAsync(this.config.weatherTomorrow);
|
|
1051
|
+
const tempTomorrowState = await this.getForeignStateAsync(this.config.weatherTomorrowTemp);
|
|
1052
|
+
|
|
1053
|
+
const weatherTomorrowText = weatherTomorrowTextState && weatherTomorrowTextState.val !== null ? weatherTomorrowTextState.val : null;
|
|
1054
|
+
const weatherTomorrow = weatherTomorrowState && weatherTomorrowState.val !== null ? weatherTomorrowState.val : null;
|
|
1055
|
+
const tempTomorrow = tempTomorrowState && tempTomorrowState.val !== null ? tempTomorrowState.val : null;
|
|
1026
1056
|
const tempText = tempTomorrow ? ` ${this.round(tempTomorrow, 1)}°C` : '';
|
|
1027
1057
|
|
|
1028
1058
|
const weatherText = weatherTomorrowText || weatherTomorrow;
|