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 CHANGED
@@ -339,15 +339,14 @@ sadam6752@gmail.com
339
339
  ### **WORK IN PROGRESS**
340
340
  -->
341
341
 
342
- ### 1.1.3 (2026-03-01)
342
+ ### 1.1.4 (2026-03-01)
343
343
 
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
344
+ * (ADD) Weather data (today and tomorrow) added to test message (testButton)
345
+ * (ADD) "Weather today" translation key added
347
346
 
348
- ### 1.1.2 (2026-03-01)
347
+ ### 1.1.3 (2026-03-01)
349
348
 
350
- * (FIX) Weather data now read correctly using getForeignStateAsync() instead of getStateValue()
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "pv-notifications",
4
- "version": "1.1.3",
4
+ "version": "1.1.4",
5
5
  "titleLang": {
6
6
  "en": "PV Notifications",
7
7
  "de": "PV-Benachrichtigungen",
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
- return `🧪 *${this.translate('Daily statistics PV system')} - TEST*
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
- *${this.translate('Test Notification')} - pv-notifications v${this.version}*`;
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
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.pv-notifications",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "PV-Anlage Batterie-Status Telegram Benachrichtigungen",
5
5
  "author": {
6
6
  "name": "Alex1808 via LLM: Qwen",