iobroker.pv-notifications 1.1.3 → 1.1.4
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 +5 -6
- package/io-package.json +1 -1
- package/main.js +47 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -339,15 +339,14 @@ sadam6752@gmail.com
|
|
|
339
339
|
### **WORK IN PROGRESS**
|
|
340
340
|
-->
|
|
341
341
|
|
|
342
|
-
### 1.1.
|
|
342
|
+
### 1.1.4 (2026-03-01)
|
|
343
343
|
|
|
344
|
-
* (ADD)
|
|
345
|
-
* (ADD)
|
|
346
|
-
* (FIX) Weather data now respects individual checkbox settings
|
|
344
|
+
* (ADD) Weather data (today and tomorrow) added to test message (testButton)
|
|
345
|
+
* (ADD) "Weather today" translation key added
|
|
347
346
|
|
|
348
|
-
### 1.1.
|
|
347
|
+
### 1.1.3 (2026-03-01)
|
|
349
348
|
|
|
350
|
-
* (
|
|
349
|
+
* (ADD) Two separate checkboxes for weather data: 'weatherInIntermediate' and 'weatherInDailyStats'
|
|
351
350
|
|
|
352
351
|
### 1.1.1 (2026-03-01)
|
|
353
352
|
|
package/io-package.json
CHANGED
package/main.js
CHANGED
|
@@ -1494,6 +1494,11 @@ ${statusText}`;
|
|
|
1494
1494
|
en: 'Weather tomorrow',
|
|
1495
1495
|
ru: 'Погода завтра',
|
|
1496
1496
|
},
|
|
1497
|
+
'Weather today': {
|
|
1498
|
+
de: 'Wetter heute',
|
|
1499
|
+
en: 'Weather today',
|
|
1500
|
+
ru: 'Погода сегодня',
|
|
1501
|
+
},
|
|
1497
1502
|
'Good PV production expected': {
|
|
1498
1503
|
de: 'Gute PV-Produktion erwartet',
|
|
1499
1504
|
en: 'Good PV production expected',
|
|
@@ -1600,7 +1605,7 @@ ${statusText}`;
|
|
|
1600
1605
|
const selfConsumption = this.round(totalProd - feedIn, 1);
|
|
1601
1606
|
const selfConsumptionRate = totalProd > 0 ? this.round((selfConsumption / totalProd) * 100, 1) : 0;
|
|
1602
1607
|
|
|
1603
|
-
|
|
1608
|
+
let message = `🧪 *${this.translate('Daily statistics PV system')} - TEST*
|
|
1604
1609
|
━━━━━━━━━━━━━━━━━━━━━━
|
|
1605
1610
|
🔋 ${this.translate('Current charge level')}: ${soc}%
|
|
1606
1611
|
⚡ ${this.translate('Current energy')}: ${currentKWh} kWh (${batteryCapacityKWh} kWh ${this.translate('Total capacity')})
|
|
@@ -1610,9 +1615,48 @@ ${statusText}`;
|
|
|
1610
1615
|
🔌 ${this.translate('Feed-in')}: ${feedIn} kWh
|
|
1611
1616
|
⚡ ${this.translate('Grid consumption')}: ${gridPower} kWh
|
|
1612
1617
|
━━━━━━━━━━━━━━━━━━━━━━
|
|
1613
|
-
💡 ${this.translate('A healthy cycle per day is normal')}
|
|
1618
|
+
💡 ${this.translate('A healthy cycle per day is normal')}`;
|
|
1619
|
+
|
|
1620
|
+
// Wetterdaten hinzufügen (heute und morgen) für Test
|
|
1621
|
+
if (this.config.weatherEnabled !== false) {
|
|
1622
|
+
try {
|
|
1623
|
+
// Wetter heute
|
|
1624
|
+
if (this.config.weatherTodayText || this.config.weatherTodayTemp) {
|
|
1625
|
+
const weatherTodayTextState = await this.getForeignStateAsync(this.config.weatherTodayText);
|
|
1626
|
+
const weatherTodayState = await this.getForeignStateAsync(this.config.weatherTodayTemp);
|
|
1627
|
+
|
|
1628
|
+
const weatherTodayText = weatherTodayTextState && weatherTodayTextState.val !== null ? weatherTodayTextState.val : null;
|
|
1629
|
+
const weatherTodayTemp = weatherTodayState && weatherTodayState.val !== null ? weatherTodayState.val : null;
|
|
1630
|
+
const tempText = weatherTodayTemp ? ` ${this.round(weatherTodayTemp, 1)}°C` : '';
|
|
1631
|
+
|
|
1632
|
+
if (weatherTodayText || weatherTodayTemp) {
|
|
1633
|
+
const weatherDesc = weatherTodayText ? this.getWeatherDescription(weatherTodayText) : '🌡️';
|
|
1634
|
+
message += `\n\n🌤️ *${this.translate('Weather today')}:* ${weatherDesc}${tempText}`;
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
// Wetter morgen
|
|
1639
|
+
if (this.config.weatherTomorrowText || this.config.weatherTomorrowTemp) {
|
|
1640
|
+
const weatherTomorrowTextState = await this.getForeignStateAsync(this.config.weatherTomorrowText);
|
|
1641
|
+
const weatherTomorrowState = await this.getForeignStateAsync(this.config.weatherTomorrowTemp);
|
|
1642
|
+
|
|
1643
|
+
const weatherTomorrowText = weatherTomorrowTextState && weatherTomorrowTextState.val !== null ? weatherTomorrowTextState.val : null;
|
|
1644
|
+
const weatherTomorrowTemp = weatherTomorrowState && weatherTomorrowState.val !== null ? weatherTomorrowState.val : null;
|
|
1645
|
+
const tempText = weatherTomorrowTemp ? ` ${this.round(weatherTomorrowTemp, 1)}°C` : '';
|
|
1614
1646
|
|
|
1615
|
-
|
|
1647
|
+
if (weatherTomorrowText || weatherTomorrowTemp) {
|
|
1648
|
+
const weatherDesc = weatherTomorrowText ? this.getWeatherDescription(weatherTomorrowText) : '🌡️';
|
|
1649
|
+
message += `\n🌤️ *${this.translate('Weather tomorrow')}:* ${weatherDesc}${tempText}`;
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1652
|
+
} catch (e) {
|
|
1653
|
+
this.log.debug(`Weather data for test not available: ${e.message}`);
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
message += `\n\n*${this.translate('Test Notification')} - pv-notifications v${this.version}*`;
|
|
1658
|
+
|
|
1659
|
+
return message;
|
|
1616
1660
|
}
|
|
1617
1661
|
|
|
1618
1662
|
/**
|