iobroker.pv-notifications 1.2.7 → 1.2.9

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.
Files changed (4) hide show
  1. package/README.md +10 -0
  2. package/io-package.json +73 -104
  3. package/main.js +187 -80
  4. package/package.json +1 -1
package/README.md CHANGED
@@ -344,6 +344,16 @@ sadam6752@gmail.com
344
344
  ### **WORK IN PROGRESS**
345
345
  -->
346
346
 
347
+ ### 1.2.9 (2026-03-02)
348
+
349
+ * (FIX) Fixed ESLint formatting issues (75 prettier/prettier errors auto-fixed with lint:fix)
350
+
351
+ ### 1.2.8 (2026-03-02)
352
+
353
+ * (FIX) Fixed duplicate news entry in io-package.json (E1036/E2005 fix)
354
+ * (FIX) Added full translations for common.news (pt, nl, fr, it, es, pl, uk, zh-cn)
355
+ * (FIX) Reduced news entries to 7 versions (W1032 fix)
356
+
347
357
  ### 1.2.7 (2026-03-02)
348
358
 
349
359
  * (FIX) Fixed io-package.json JSON syntax error (invalid duplicate news section removed)
package/io-package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "pv-notifications",
4
- "version": "1.2.7",
4
+ "version": "1.2.9",
5
5
  "titleLang": {
6
6
  "en": "PV Notifications",
7
7
  "de": "PV-Benachrichtigungen",
@@ -29,60 +29,96 @@
29
29
  "zh-cn": "发送 Telegram 通知用于 PV 电池状态"
30
30
  },
31
31
  "news": {
32
+ "1.2.9": {
33
+ "en": "Fixed ESLint formatting issues (75 prettier/prettier errors auto-fixed with lint:fix)",
34
+ "de": "ESLint-Formatierungsfehler behoben (75 prettier/prettier Fehler mit lint:fix automatisch korrigiert)",
35
+ "ru": "Исправлены ошибки форматирования ESLint (75 ошибок prettier/prettier автоматически исправлены через lint:fix)",
36
+ "pt": "Corrigidos problemas de formatação ESLint (75 erros prettier/prettier corrigidos automaticamente com lint:fix)",
37
+ "nl": "ESLint-opmaakproblemen opgelost (75 prettier/prettier-fouten automatisch hersteld met lint:fix)",
38
+ "fr": "Correction des problèmes de formatage ESLint (75 erreurs prettier/prettier corrigées automatiquement avec lint:fix)",
39
+ "it": "Corretti problemi di formattazione ESLint (75 errori prettier/prettier corretti automaticamente con lint:fix)",
40
+ "es": "Corregidos problemas de formato ESLint (75 errores prettier/prettier corregidos automáticamente con lint:fix)",
41
+ "pl": "Naprawiono problemy z formatowaniem ESLint (75 błędów prettier/prettier automatycznie naprawionych za pomocą lint:fix)",
42
+ "uk": "Виправлено проблеми з форматуванням ESLint (75 помилок prettier/prettier автоматично виправлено за допомогою lint:fix)",
43
+ "zh-cn": "已修复 ESLint 格式化问题(75 个 prettier/prettier 错误已通过 lint:fix 自动修复)"
44
+ },
45
+ "1.2.8": {
46
+ "en": "Fixed duplicate news entry in io-package.json (E1036/E2005 fix)",
47
+ "de": "Doppelten news-Eintrag in io-package.json behoben (E1036/E2005 Fix)",
48
+ "ru": "Исправлена дублирующаяся запись news в io-package.json (исправление E1036/E2005)",
49
+ "pt": "Corrigida entrada duplicada de notícias no io-package.json (correção E1036/E2005)",
50
+ "nl": "Dubbele nieuwsvermelding in io-package.json hersteld (E1036/E2005 fix)",
51
+ "fr": "Correction d'une entrée de nouvelles en double dans io-package.json (correction E1036/E2005)",
52
+ "it": "Corretta voce duplicata delle notizie in io-package.json (correzione E1036/E2005)",
53
+ "es": "Entrada de noticias duplicada corregida en io-package.json (corrección E1036/E2005)",
54
+ "pl": "Naprawiono podwójny wpis wiadomości w io-package.json (poprawka E1036/E2005)",
55
+ "uk": "Виправлено подвійний запис новин у io-package.json (виправлення E1036/E2005)",
56
+ "zh-cn": "已修复 io-package.json 中的重复新闻条目(E1036/E2005 修复)"
57
+ },
32
58
  "1.2.7": {
33
59
  "en": "Fixed io-package.json JSON syntax error (invalid duplicate news section removed)",
34
60
  "de": "io-package.json JSON-Syntaxfehler behoben (ungültiger doppelter news-Abschnitt entfernt)",
35
- "ru": "Исправлена ошибка синтаксиса JSON в io-package.json (удален недопустимый дублирующийся раздел news)"
61
+ "ru": "Исправлена ошибка синтаксиса JSON в io-package.json (удален недопустимый дублирующийся раздел news)",
62
+ "pt": "Erro de sintaxe JSON no io-package.json corrigido (seção de notícias duplicada removida)",
63
+ "nl": "JSON-syntaxfout in io-package.json hersteld (ongeldige dubbele nieuwssectie verwijderd)",
64
+ "fr": "Erreur de syntaxe JSON dans io-package.json corrigée (section de nouvelles en double supprimée)",
65
+ "it": "Errore di sintassi JSON in io-package.json corretto (sezione notizie duplicata rimossa)",
66
+ "es": "Error de sintaxis JSON en io-package.json corregido (sección de noticias duplicada eliminada)",
67
+ "pl": "Naprawiono błąd składni JSON w io-package.json (usunięto podwójną sekcję wiadomości)",
68
+ "uk": "Виправлено помилку синтаксису JSON у io-package.json (видалено подвійний розділ новин)",
69
+ "zh-cn": "已修复 io-package.json JSON 语法错误(已删除无效的重复新闻部分)"
36
70
  },
37
71
  "1.2.6": {
38
72
  "en": "Added size attributes (xs, xl) for monthlyStatsDay, monthlyStatsTime, weatherEnabled, weatherInIntermediate, weatherInDailyStats, highProduction, highConsumption fields (E5507 fix)",
39
73
  "de": "Größenattribute (xs, xl) für monthlyStatsDay, monthlyStatsTime, weatherEnabled, weatherInIntermediate, weatherInDailyStats, highProduction, highConsumption Felder hinzugefügt (E5507 Fix)",
40
- "ru": "Добавлены атрибуты размеров (xs, xl) для полей monthlyStatsDay, monthlyStatsTime, weatherEnabled, weatherInIntermediate, weatherInDailyStats, highProduction, highConsumption (исправление E5507)"
74
+ "ru": "Добавлены атрибуты размеров (xs, xl) для полей monthlyStatsDay, monthlyStatsTime, weatherEnabled, weatherInIntermediate, weatherInDailyStats, highProduction, highConsumption (исправление E5507)",
75
+ "pt": "Atributos de tamanho (xs, xl) adicionados para os campos monthlyStatsDay, monthlyStatsTime, weatherEnabled, weatherInIntermediate, weatherInDailyStats, highProduction, highConsumption (correção E5507)",
76
+ "nl": "Grootte-attributen (xs, xl) toegevoegd voor monthlyStatsDay, monthlyStatsTime, weatherEnabled, weatherInIntermediate, weatherInDailyStats, highProduction, highConsumption velden (E5507 fix)",
77
+ "fr": "Attributs de taille (xs, xl) ajoutés pour les champs monthlyStatsDay, monthlyStatsTime, weatherEnabled, weatherInIntermediate, weatherInDailyStats, highProduction, highConsumption (correction E5507)",
78
+ "it": "Aggiunti attributi di dimensione (xs, xl) per i campi monthlyStatsDay, monthlyStatsTime, weatherEnabled, weatherInIntermediate, weatherInDailyStats, highProduction, highConsumption (correzione E5507)",
79
+ "es": "Atributos de tamaño (xs, xl) agregados para los campos monthlyStatsDay, monthlyStatsTime, weatherEnabled, weatherInIntermediate, weatherInDailyStats, highProduction, highConsumption (corrección E5507)",
80
+ "pl": "Dodano atrybuty rozmiaru (xs, xl) dla pól monthlyStatsDay, monthlyStatsTime, weatherEnabled, weatherInIntermediate, weatherInDailyStats, highProduction, highConsumption (poprawka E5507)",
81
+ "uk": "Додано атрибути розміру (xs, xl) для полів monthlyStatsDay, monthlyStatsTime, weatherEnabled, weatherInIntermediate, weatherInDailyStats, highProduction, highConsumption (виправлення E5507)",
82
+ "zh-cn": "已为 monthlyStatsDay、monthlyStatsTime、weatherEnabled、weatherInIntermediate、weatherInDailyStats、highProduction、highConsumption 字段添加大小属性(xs, xl)(E5507 修复)"
41
83
  },
42
84
  "1.2.5": {
43
85
  "en": "Added size attributes (xs, xl) for monthlyStatsEnabled, minIntervalIntermediate, statsDayTime, statsWeekDay, statsWeekTime fields (E5507 fix)",
44
86
  "de": "Größenattribute (xs, xl) für monthlyStatsEnabled, minIntervalIntermediate, statsDayTime, statsWeekDay, statsWeekTime Felder hinzugefügt (E5507 Fix)",
45
- "ru": "Добавлены атрибуты размеров (xs, xl) для полей monthlyStatsEnabled, minIntervalIntermediate, statsDayTime, statsWeekDay, statsWeekTime (исправление E5507)"
87
+ "ru": "Добавлены атрибуты размеров (xs, xl) для полей monthlyStatsEnabled, minIntervalIntermediate, statsDayTime, statsWeekDay, statsWeekTime (исправление E5507)",
88
+ "pt": "Atributos de tamanho (xs, xl) adicionados para os campos monthlyStatsEnabled, minIntervalIntermediate, statsDayTime, statsWeekDay, statsWeekTime (correção E5507)",
89
+ "nl": "Grootte-attributen (xs, xl) toegevoegd voor monthlyStatsEnabled, minIntervalIntermediate, statsDayTime, statsWeekDay, statsWeekTime velden (E5507 fix)",
90
+ "fr": "Attributs de taille (xs, xl) ajoutés pour les champs monthlyStatsEnabled, minIntervalIntermediate, statsDayTime, statsWeekDay, statsWeekTime (correction E5507)",
91
+ "it": "Aggiunti attributi di dimensione (xs, xl) per i campi monthlyStatsEnabled, minIntervalIntermediate, statsDayTime, statsWeekDay, statsWeekTime (correzione E5507)",
92
+ "es": "Atributos de tamaño (xs, xl) agregados para los campos monthlyStatsEnabled, minIntervalIntermediate, statsDayTime, statsWeekDay, statsWeekTime (corrección E5507)",
93
+ "pl": "Dodano atrybuty rozmiaru (xs, xl) dla pól monthlyStatsEnabled, minIntervalIntermediate, statsDayTime, statsWeekDay, statsWeekTime (poprawka E5507)",
94
+ "uk": "Додано атрибути розміру (xs, xl) для полів monthlyStatsEnabled, minIntervalIntermediate, statsDayTime, statsWeekDay, statsWeekTime (виправлення E5507)",
95
+ "zh-cn": "已为 monthlyStatsEnabled、minIntervalIntermediate、statsDayTime、statsWeekDay、statsWeekTime 字段添加大小属性(xs, xl)(E5507 修复)"
46
96
  },
47
97
  "1.2.4": {
48
98
  "en": "Added LICENSE file and fixed copyright formatting (W6009/W6011/W7004 fixes)",
49
99
  "de": "LICENSE-Datei hinzugefügt und Copyright-Formatierung korrigiert (W6009/W6011/W7004 Fixes)",
50
- "ru": "Добавлен файл LICENSE и исправлено форматирование авторских прав (исправления W6009/W6011/W7004)"
100
+ "ru": "Добавлен файл LICENSE и исправлено форматирование авторских прав (исправления W6009/W6011/W7004)",
101
+ "pt": "Arquivo LICENSE adicionado e formatação de copyright corrigida (correções W6009/W6011/W7004)",
102
+ "nl": "LICENSE-bestand toegevoegd en copyright-opmaak hersteld (W6009/W6011/W7007 fixes)",
103
+ "fr": "Fichier LICENSE ajouté et formatage des droits d'auteur corrigé (corrections W6009/W6011/W7004)",
104
+ "it": "Aggiunto file LICENSE e corretta formattazione del copyright (correzioni W6009/W6011/W7004)",
105
+ "es": "Archivo LICENSE agregado y formato de derechos de autor corregido (correcciones W6009/W6011/W7004)",
106
+ "pl": "Dodano plik LICENSE i poprawiono formatowanie praw autorskich (poprawki W6009/W6011/W7004)",
107
+ "uk": "Додано файл LICENSE та виправлено форматування авторських прав (виправлення W6009/W6011/W7004)",
108
+ "zh-cn": "已添加 LICENSE 文件并修复版权格式(W6009/W6011/W7004 修复)"
51
109
  },
52
110
  "1.2.3": {
53
111
  "en": "Added size attributes (xs, xl) for minIntervalFull, minIntervalEmpty, intermediateSteps, quietModeStart, quietModeEnd fields in admin UI (E5507 fix)",
54
112
  "de": "Größenattribute (xs, xl) für minIntervalFull, minIntervalEmpty, intermediateSteps, quietModeStart, quietModeEnd Felder im Admin-UI hinzugefügt (E5507 Fix)",
55
- "ru": "Добавлены атрибуты размеров (xs, xl) для полей minIntervalFull, minIntervalEmpty, intermediateSteps, quietModeStart, quietModeEnd в админ-интерфейсе (исправление E5507)"
56
- },
57
- "1.2.2": {
58
- "en": "Fixed weekly statistics: Now uses weeklyProduction/weeklyConsumption/weeklyFeedIn/weeklyGridPower fields instead of daily values",
59
- "de": "Wochenstatistik fixiert: Verwendet jetzt weeklyProduction/weeklyConsumption/weeklyFeedIn/weeklyGridPower Felder statt Tageswerten",
60
- "ru": "Исправлена недельная статистика: теперь используются поля weeklyProduction/weeklyConsumption/weeklyFeedIn/weeklyGridPower вместо дневных значений"
61
- },
62
- "1.2.1": {
63
- "en": "Added size attributes (xs, xl) for night mode and quiet mode fields in admin UI",
64
- "de": "Größenattribute (xs, xl) für Nachtmodus und Ruhemodus-Felder im Admin-UI hinzugefügt",
65
- "ru": "Добавлены атрибуты размеров (xs, xl) для полей ночного режима и тихого режима в админ-интерфейсе"
66
- },
67
- "1.2.0": {
68
- "en": "Added common.news section for repository checker (E136 fix)",
69
- "de": "common.news Sektion für Repository Checker hinzugefügt (E136 Fix)",
70
- "ru": "Добавлен раздел common.news для проверки репозитория (исправление E136)"
71
- },
72
- "1.1.9": {
73
- "en": "Weather today added to battery full (100%) and empty (0%) messages",
74
- "de": "Wetter heute zu Batterie VOLL (100%) und LEER (0%) Nachrichten hinzugefügt",
75
- "ru": "Погода сегодня добавлена в сообщения о полной (100%) и пустой (0%) батарее"
76
- },
77
- "1.1.8": {
78
- "en": "Weather today added to intermediate messages",
79
- "de": "Wetter heute zu Intermediate-Nachrichten hinzugefügt",
80
- "ru": "Погода сегодня добавлена в промежуточные сообщения"
81
- },
82
- "1.1.7": {
83
- "en": "Weather data null-check fix to prevent errors",
84
- "de": "Wetterdaten null-check Fix um Fehler zu vermeiden",
85
- "ru": "Исправлена проверка null для данных о погоде"
113
+ "ru": "Добавлены атрибуты размеров (xs, xl) для полей minIntervalFull, minIntervalEmpty, intermediateSteps, quietModeStart, quietModeEnd в админ-интерфейсе (исправление E5507)",
114
+ "pt": "Atributos de tamanho (xs, xl) adicionados para os campos minIntervalFull, minIntervalEmpty, intermediateSteps, quietModeStart, quietModeEnd na interface de administração (correção E5507)",
115
+ "nl": "Grootte-attributen (xs, xl) toegevoegd voor minIntervalFull, minIntervalEmpty, intermediateSteps, quietModeStart, quietModeEnd velden in admin UI (E5507 fix)",
116
+ "fr": "Attributs de taille (xs, xl) ajoutés pour les champs minIntervalFull, minIntervalEmpty, intermediateSteps, quietModeStart, quietModeEnd dans l'interface d'administration (correction E5507)",
117
+ "it": "Aggiunti attributi di dimensione (xs, xl) per i campi minIntervalFull, minIntervalEmpty, intermediateSteps, quietModeStart, quietModeEnd nell'interfaccia di amministrazione (correzione E5507)",
118
+ "es": "Atributos de tamaño (xs, xl) agregados para los campos minIntervalFull, minIntervalEmpty, intermediateSteps, quietModeStart, quietModeEnd en la interfaz de administración (corrección E5507)",
119
+ "pl": "Dodano atrybuty rozmiaru (xs, xl) dla pól minIntervalFull, minIntervalEmpty, intermediateSteps, quietModeStart, quietModeEnd w interfejsie administracyjnym (poprawka E5507)",
120
+ "uk": "Додано атрибути розміру (xs, xl) для полів minIntervalFull, minIntervalEmpty, intermediateSteps, quietModeStart, quietModeEnd в адмін-інтерфейсі (виправлення E5507)",
121
+ "zh-cn": "已为管理界面中的 minIntervalFull、minIntervalEmpty、intermediateSteps、quietModeStart、quietModeEnd 字段添加大小属性(xs, xl)(E5507 修复)"
86
122
  }
87
123
  },
88
124
  "authors": [
@@ -122,74 +158,7 @@
122
158
  {
123
159
  "admin": ">=7.6.20"
124
160
  }
125
- ],
126
- "news": {
127
- "1.0.93": {
128
- "en": "Repository checker fixes: size attributes added for number fields (batteryCapacityWh, thresholdFull/Empty/ResetFull/ResetEmpty), VSCode schema definitions updated",
129
- "de": "Repository-Checker-Fixes: size-Attribute für number-Felder hinzugefügt (batteryCapacityWh, thresholdFull/Empty/ResetFull/ResetEmpty), VSCode-Schema-Definitionen aktualisiert",
130
- "ru": "Исправления репозитория: добавлены атрибуты size для числовых полей (batteryCapacityWh, thresholdFull/Empty/ResetFull/ResetEmpty), обновлены определения схемы VSCode",
131
- "pt": "Correções do repositório: atributos size adicionados para campos numéricos (batteryCapacityWh, thresholdFull/Empty/ResetFull/ResetEmpty), definições de esquema VSCode atualizadas",
132
- "nl": "Repository checker fixes: size-attributen toegevoegd voor nummervelden (batteryCapacityWh, thresholdFull/Empty/ResetFull/ResetEmpty), VSCode-schema-definities bijgewerkt",
133
- "fr": "Corrections du dépôt : attributs size ajoutés pour les champs numériques (batteryCapacityWh, thresholdFull/Empty/ResetFull/ResetEmpty), définitions de schéma VSCode mises à jour",
134
- "it": "Correzioni del repository: aggiunti attributi size per i campi numerici (batteryCapacityWh, thresholdFull/Empty/ResetFull/ResetEmpty), aggiornate definizioni di schema VSCode",
135
- "es": "Correcciones del repositorio: atributos size agregados para campos numéricos (batteryCapacityWh, thresholdFull/Empty/ResetFull/ResetEmpty), definiciones de esquema VSCode actualizadas",
136
- "pl": "Poprawki repozytorium: dodano atrybuty size dla pól liczbowych (batteryCapacityWh, thresholdFull/Empty/ResetFull/ResetEmpty), zaktualizowano definicje schematu VSCode",
137
- "uk": "Виправлення репозиторію: додано атрибути size для числових полів (batteryCapacityWh, thresholdFull/Empty/ResetFull/ResetEmpty), оновлено визначення схеми VSCode",
138
- "zh-cn": "仓库修复:已为数字字段添加 size 属性(batteryCapacityWh, thresholdFull/Empty/ResetFull/ResetEmpty),已更新 VSCode 架构定义"
139
- },
140
- "1.0.92": {
141
- "en": "VSCode settings added with JSON schema definitions for better development experience",
142
- "de": "VSCode-Einstellungen mit JSON-Schema-Definitionen für bessere Entwicklungserfahrung hinzugefügt",
143
- "ru": "Добавлены настройки VSCode с определениями JSON-схемы для улучшения разработки",
144
- "pt": "Configurações do VSCode adicionadas com definições de esquema JSON para melhor experiência de desenvolvimento",
145
- "nl": "VSCode-instellingen toegevoegd met JSON-schema-definities voor betere ontwikkelervaring",
146
- "fr": "Paramètres VSCode ajoutés avec des définitions de schéma JSON pour une meilleure expérience de développement",
147
- "it": "Aggiunte impostazioni VSCode con definizioni di schema JSON per una migliore esperienza di sviluppo",
148
- "es": "Configuraciones de VSCode agregadas con definiciones de esquema JSON para mejor experiencia de desarrollo",
149
- "pl": "Dodano ustawienia VSCode z definicjami schematu JSON dla lepszego doświadczenia programistycznego",
150
- "uk": "Додано налаштування VSCode з визначеннями JSON-схеми для покращення розробки",
151
- "zh-cn": "已添加 VSCode 设置与 JSON 架构定义,以提升开发体验"
152
- },
153
- "1.0.91": {
154
- "en": "Repository checker fixes: old news removed, size attributes added for all objectId fields, .commitinfo added to .gitignore",
155
- "de": "Repository-Checker-Fixes: alte News entfernt, size-Attribute für alle objectId-Felder hinzugefügt, .commitinfo zu .gitignore hinzugefügt",
156
- "ru": "Исправления репозитория: старые новости удалены, добавлены атрибуты size для всех полей objectId, .commitinfo добавлен в .gitignore",
157
- "pt": "Correções do repositório: notícias antigas removidas, atributos size adicionados para todos os campos objectId, .commitinfo adicionado ao .gitignore",
158
- "nl": "Repository checker fixes: oude nieuwsberichten verwijderd, size-attributen toegevoegd voor alle objectId-velden, .commitinfo toegevoegd aan .gitignore",
159
- "fr": "Corrections du dépôt : anciennes nouvelles supprimées, attributs size ajoutés pour tous les champs objectId, .commitinfo ajouté à .gitignore",
160
- "it": "Correzioni del repository: vecchie notizie rimosse, aggiunti attributi size per tutti i campi objectId, .commitinfo aggiunto a .gitignore",
161
- "es": "Correcciones del repositorio: noticias antiguas eliminadas, atributos size agregados para todos los campos objectId, .commitinfo agregado a .gitignore",
162
- "pl": "Poprawki repozytorium: usunięto stare wiadomości, dodano atrybuty size dla wszystkich pól objectId, dodano .commitinfo do .gitignore",
163
- "uk": "Виправлення репозиторію: старі новини видалено, додано атрибути size для всіх полів objectId, .commitinfo додано до .gitignore",
164
- "zh-cn": "仓库修复:旧新闻已删除,已为所有 objectId 字段添加 size 属性,.commitinfo 已添加到 .gitignore"
165
- },
166
- "1.0.90": {
167
- "en": "JSDoc parameter descriptions added for all functions",
168
- "de": "JSDoc-Parameterbeschreibungen für alle Funktionen hinzugefügt",
169
- "ru": "Добавлены описания параметров JSDoc для всех функций",
170
- "pt": "Descrições de parâmetros JSDoc adicionadas para todas as funções",
171
- "nl": "JSDoc-parameterbeschrijvingen toegevoegd voor alle functies",
172
- "fr": "Descriptions de paramètres JSDoc ajoutées pour toutes les fonctions",
173
- "it": "Aggiunte descrizioni parametri JSDoc per tutte le funzioni",
174
- "es": "Descripciones de parámetros JSDoc agregadas para todas las funciones",
175
- "pl": "Dodano opisy parametrów JSDoc dla wszystkich funkcji",
176
- "uk": "Додано описи параметрів JSDoc для всіх функцій",
177
- "zh-cn": "已为所有函数添加 JSDoc 参数描述"
178
- },
179
- "1.0.89": {
180
- "en": "Repository checker fixes: createState replaced with setObjectNotExists, size attributes added to jsonConfig, dependencies updated, translations added for all languages",
181
- "de": "Repository-Checker-Fixes: createState durch setObjectNotExists ersetzt, size-Attribute zu jsonConfig hinzugefügt, Abhängigkeiten aktualisiert, Übersetzungen für alle Sprachen hinzugefügt",
182
- "ru": "Исправления репозитория: createState заменен на setObjectNotExists, добавлены атрибуты size в jsonConfig, обновлены зависимости, добавлены переводы для всех языков",
183
- "pt": "Correções do verificador de repositório: createState substituído por setObjectNotExists, atributos size adicionados ao jsonConfig, dependências atualizadas, traduções adicionadas para todos os idiomas",
184
- "nl": "Repository checker fixes: createState vervangen door setObjectNotExists, size-attributen toegevoegd aan jsonConfig, afhankelijkheden bijgewerkt, vertalingen toegevoegd voor alle talen",
185
- "fr": "Corrections du vérificateur de dépôt : createState remplacé par setObjectNotExists, attributs size ajoutés à jsonConfig, dépendances mises à jour, traductions ajoutées pour toutes les langues",
186
- "it": "Correzioni del repository checker: createState sostituito con setObjectNotExists, aggiunti attributi size a jsonConfig, dipendenze aggiornate, aggiunte traduzioni per tutte le lingue",
187
- "es": "Correcciones del verificador de repositorio: createState reemplazado por setObjectNotExists, atributos size agregados a jsonConfig, dependencias actualizadas, traducciones agregadas para todos los idiomas",
188
- "pl": "Poprawki checkera repozytorium: createState zastąpiono przez setObjectNotExists, dodano atrybuty size do jsonConfig, zaktualizowano zależności, dodano tłumaczenia dla wszystkich języków",
189
- "uk": "Виправлення перевірки репозиторію: createState замінено на setObjectNotExists, додано атрибути size до jsonConfig, оновлено залежності, додано переклади для всіх мов",
190
- "zh-cn": "仓库检查器修复:createState 已替换为 setObjectNotExists,size 属性已添加到 jsonConfig,已更新依赖,已添加所有语言的翻译"
191
- }
192
- }
161
+ ]
193
162
  },
194
163
  "native": {
195
164
  "telegramInstance": "telegram.0",
package/main.js CHANGED
@@ -91,12 +91,16 @@ class PvNotifications extends utils.Adapter {
91
91
  this.log.info('PV Notifications Adapter started');
92
92
 
93
93
  // Migration: Set weather checkboxes to true if not set (for updates from < v1.1.3)
94
- if (this.config.weatherEnabled === true &&
95
- (this.config.weatherInIntermediate === undefined || this.config.weatherInIntermediate === null)) {
94
+ if (
95
+ this.config.weatherEnabled === true &&
96
+ (this.config.weatherInIntermediate === undefined || this.config.weatherInIntermediate === null)
97
+ ) {
96
98
  this.log.info('Migration: Setting weatherInIntermediate to true (default)');
97
99
  }
98
- if (this.config.weatherEnabled === true &&
99
- (this.config.weatherInDailyStats === undefined || this.config.weatherInDailyStats === null)) {
100
+ if (
101
+ this.config.weatherEnabled === true &&
102
+ (this.config.weatherInDailyStats === undefined || this.config.weatherInDailyStats === null)
103
+ ) {
100
104
  this.log.info('Migration: Setting weatherInDailyStats to true (default)');
101
105
  }
102
106
 
@@ -433,12 +437,17 @@ class PvNotifications extends utils.Adapter {
433
437
  const lastWeekFullCycles = await this.getStateAsync('statistics.lastWeekFullCycles');
434
438
  const lastWeekEmptyCycles = await this.getStateAsync('statistics.lastWeekEmptyCycles');
435
439
 
436
- this.stats.lastWeekProduction = lastWeekProduction && lastWeekProduction.val !== null ? lastWeekProduction.val : 0;
437
- this.stats.lastWeekConsumption = lastWeekConsumption && lastWeekConsumption.val !== null ? lastWeekConsumption.val : 0;
440
+ this.stats.lastWeekProduction =
441
+ lastWeekProduction && lastWeekProduction.val !== null ? lastWeekProduction.val : 0;
442
+ this.stats.lastWeekConsumption =
443
+ lastWeekConsumption && lastWeekConsumption.val !== null ? lastWeekConsumption.val : 0;
438
444
  this.stats.lastWeekFeedIn = lastWeekFeedIn && lastWeekFeedIn.val !== null ? lastWeekFeedIn.val : 0;
439
- this.stats.lastWeekGridPower = lastWeekGridPower && lastWeekGridPower.val !== null ? lastWeekGridPower.val : 0;
440
- this.stats.lastWeekFullCycles = lastWeekFullCycles && lastWeekFullCycles.val !== null ? lastWeekFullCycles.val : 0;
441
- this.stats.lastWeekEmptyCycles = lastWeekEmptyCycles && lastWeekEmptyCycles.val !== null ? lastWeekEmptyCycles.val : 0;
445
+ this.stats.lastWeekGridPower =
446
+ lastWeekGridPower && lastWeekGridPower.val !== null ? lastWeekGridPower.val : 0;
447
+ this.stats.lastWeekFullCycles =
448
+ lastWeekFullCycles && lastWeekFullCycles.val !== null ? lastWeekFullCycles.val : 0;
449
+ this.stats.lastWeekEmptyCycles =
450
+ lastWeekEmptyCycles && lastWeekEmptyCycles.val !== null ? lastWeekEmptyCycles.val : 0;
442
451
 
443
452
  // Load saved last month data from states
444
453
  const lastMonthProduction = await this.getStateAsync('statistics.lastMonthProduction');
@@ -448,12 +457,17 @@ class PvNotifications extends utils.Adapter {
448
457
  const lastMonthFullCycles = await this.getStateAsync('statistics.lastMonthFullCycles');
449
458
  const lastMonthEmptyCycles = await this.getStateAsync('statistics.lastMonthEmptyCycles');
450
459
 
451
- this.stats.lastMonthProduction = lastMonthProduction && lastMonthProduction.val !== null ? lastMonthProduction.val : 0;
452
- this.stats.lastMonthConsumption = lastMonthConsumption && lastMonthConsumption.val !== null ? lastMonthConsumption.val : 0;
460
+ this.stats.lastMonthProduction =
461
+ lastMonthProduction && lastMonthProduction.val !== null ? lastMonthProduction.val : 0;
462
+ this.stats.lastMonthConsumption =
463
+ lastMonthConsumption && lastMonthConsumption.val !== null ? lastMonthConsumption.val : 0;
453
464
  this.stats.lastMonthFeedIn = lastMonthFeedIn && lastMonthFeedIn.val !== null ? lastMonthFeedIn.val : 0;
454
- this.stats.lastMonthGridPower = lastMonthGridPower && lastMonthGridPower.val !== null ? lastMonthGridPower.val : 0;
455
- this.stats.lastMonthFullCycles = lastMonthFullCycles && lastMonthFullCycles.val !== null ? lastMonthFullCycles.val : 0;
456
- this.stats.lastMonthEmptyCycles = lastMonthEmptyCycles && lastMonthEmptyCycles.val !== null ? lastMonthEmptyCycles.val : 0;
465
+ this.stats.lastMonthGridPower =
466
+ lastMonthGridPower && lastMonthGridPower.val !== null ? lastMonthGridPower.val : 0;
467
+ this.stats.lastMonthFullCycles =
468
+ lastMonthFullCycles && lastMonthFullCycles.val !== null ? lastMonthFullCycles.val : 0;
469
+ this.stats.lastMonthEmptyCycles =
470
+ lastMonthEmptyCycles && lastMonthEmptyCycles.val !== null ? lastMonthEmptyCycles.val : 0;
457
471
 
458
472
  this.log.info('Statistics loaded from states');
459
473
  } catch (e) {
@@ -882,35 +896,56 @@ class PvNotifications extends utils.Adapter {
882
896
  🔌 ${this.translate('Feed-in today')}: ${this.round(Math.abs(feedIn), 0)} kWh`;
883
897
 
884
898
  // Wetter-Prognose hinzufügen (heute und morgen)
885
- const weatherConfigured = this.config.weatherTodayText || this.config.weatherTodayTemp || this.config.weatherTomorrowText || this.config.weatherTomorrow;
899
+ const weatherConfigured =
900
+ this.config.weatherTodayText ||
901
+ this.config.weatherTodayTemp ||
902
+ this.config.weatherTomorrowText ||
903
+ this.config.weatherTomorrow;
886
904
  if (this.config.weatherEnabled !== false && weatherConfigured) {
887
905
  try {
888
906
  // Wetter heute
889
907
  if (this.config.weatherTodayText || this.config.weatherTodayTemp) {
890
- const weatherTodayTextState = this.config.weatherTodayText ? await this.getForeignStateAsync(this.config.weatherTodayText) : null;
891
- const weatherTodayTempState = this.config.weatherTodayTemp ? await this.getForeignStateAsync(this.config.weatherTodayTemp) : null;
892
-
893
- const weatherTodayText = weatherTodayTextState && weatherTodayTextState.val !== null ? weatherTodayTextState.val : null;
894
- const weatherTodayTemp = weatherTodayTempState && weatherTodayTempState.val !== null ? weatherTodayTempState.val : null;
908
+ const weatherTodayTextState = this.config.weatherTodayText
909
+ ? await this.getForeignStateAsync(this.config.weatherTodayText)
910
+ : null;
911
+ const weatherTodayTempState = this.config.weatherTodayTemp
912
+ ? await this.getForeignStateAsync(this.config.weatherTodayTemp)
913
+ : null;
914
+
915
+ const weatherTodayText =
916
+ weatherTodayTextState && weatherTodayTextState.val !== null ? weatherTodayTextState.val : null;
917
+ const weatherTodayTemp =
918
+ weatherTodayTempState && weatherTodayTempState.val !== null ? weatherTodayTempState.val : null;
895
919
  const todayTempText = weatherTodayTemp ? ` ${this.round(weatherTodayTemp, 1)}°C` : '';
896
-
920
+
897
921
  if (weatherTodayText || weatherTodayTemp) {
898
922
  const weatherDesc = weatherTodayText ? this.getWeatherDescription(weatherTodayText) : '🌡️';
899
923
  message += `\n🌤️ Heute: ${weatherDesc}${todayTempText}`;
900
924
  }
901
925
  }
902
-
926
+
903
927
  // Wetter morgen
904
928
  if (this.config.weatherTomorrowText || this.config.weatherTomorrow) {
905
- const weatherTomorrowTextState = this.config.weatherTomorrowText ? await this.getForeignStateAsync(this.config.weatherTomorrowText) : null;
906
- const weatherTomorrowState = this.config.weatherTomorrow ? await this.getForeignStateAsync(this.config.weatherTomorrow) : null;
907
- const tempTomorrowState = this.config.weatherTomorrowTemp ? await this.getForeignStateAsync(this.config.weatherTomorrowTemp) : null;
908
-
909
- const weatherTomorrowText = weatherTomorrowTextState && weatherTomorrowTextState.val !== null ? weatherTomorrowTextState.val : null;
910
- const weatherTomorrow = weatherTomorrowState && weatherTomorrowState.val !== null ? weatherTomorrowState.val : null;
911
- const tempTomorrow = tempTomorrowState && tempTomorrowState.val !== null ? tempTomorrowState.val : null;
929
+ const weatherTomorrowTextState = this.config.weatherTomorrowText
930
+ ? await this.getForeignStateAsync(this.config.weatherTomorrowText)
931
+ : null;
932
+ const weatherTomorrowState = this.config.weatherTomorrow
933
+ ? await this.getForeignStateAsync(this.config.weatherTomorrow)
934
+ : null;
935
+ const tempTomorrowState = this.config.weatherTomorrowTemp
936
+ ? await this.getForeignStateAsync(this.config.weatherTomorrowTemp)
937
+ : null;
938
+
939
+ const weatherTomorrowText =
940
+ weatherTomorrowTextState && weatherTomorrowTextState.val !== null
941
+ ? weatherTomorrowTextState.val
942
+ : null;
943
+ const weatherTomorrow =
944
+ weatherTomorrowState && weatherTomorrowState.val !== null ? weatherTomorrowState.val : null;
945
+ const tempTomorrow =
946
+ tempTomorrowState && tempTomorrowState.val !== null ? tempTomorrowState.val : null;
912
947
  const tempText = tempTomorrow ? ` ${this.round(tempTomorrow, 1)}°C` : '';
913
-
948
+
914
949
  const weatherText = weatherTomorrowText || weatherTomorrow;
915
950
  if (weatherText) {
916
951
  const weatherDesc = this.getWeatherDescription(weatherText);
@@ -953,35 +988,56 @@ class PvNotifications extends utils.Adapter {
953
988
  🏠 ${this.translate('Consumption today')}: ${this.round(consumption)} W`;
954
989
 
955
990
  // Wetter-Prognose hinzufügen (heute und morgen)
956
- const weatherConfigured = this.config.weatherTodayText || this.config.weatherTodayTemp || this.config.weatherTomorrowText || this.config.weatherTomorrow;
991
+ const weatherConfigured =
992
+ this.config.weatherTodayText ||
993
+ this.config.weatherTodayTemp ||
994
+ this.config.weatherTomorrowText ||
995
+ this.config.weatherTomorrow;
957
996
  if (this.config.weatherEnabled !== false && weatherConfigured) {
958
997
  try {
959
998
  // Wetter heute
960
999
  if (this.config.weatherTodayText || this.config.weatherTodayTemp) {
961
- const weatherTodayTextState = this.config.weatherTodayText ? await this.getForeignStateAsync(this.config.weatherTodayText) : null;
962
- const weatherTodayTempState = this.config.weatherTodayTemp ? await this.getForeignStateAsync(this.config.weatherTodayTemp) : null;
963
-
964
- const weatherTodayText = weatherTodayTextState && weatherTodayTextState.val !== null ? weatherTodayTextState.val : null;
965
- const weatherTodayTemp = weatherTodayTempState && weatherTodayTempState.val !== null ? weatherTodayTempState.val : null;
1000
+ const weatherTodayTextState = this.config.weatherTodayText
1001
+ ? await this.getForeignStateAsync(this.config.weatherTodayText)
1002
+ : null;
1003
+ const weatherTodayTempState = this.config.weatherTodayTemp
1004
+ ? await this.getForeignStateAsync(this.config.weatherTodayTemp)
1005
+ : null;
1006
+
1007
+ const weatherTodayText =
1008
+ weatherTodayTextState && weatherTodayTextState.val !== null ? weatherTodayTextState.val : null;
1009
+ const weatherTodayTemp =
1010
+ weatherTodayTempState && weatherTodayTempState.val !== null ? weatherTodayTempState.val : null;
966
1011
  const todayTempText = weatherTodayTemp ? ` ${this.round(weatherTodayTemp, 1)}°C` : '';
967
-
1012
+
968
1013
  if (weatherTodayText || weatherTodayTemp) {
969
1014
  const weatherDesc = weatherTodayText ? this.getWeatherDescription(weatherTodayText) : '🌡️';
970
1015
  message += `\n🌤️ Heute: ${weatherDesc}${todayTempText}`;
971
1016
  }
972
1017
  }
973
-
1018
+
974
1019
  // Wetter morgen
975
1020
  if (this.config.weatherTomorrowText || this.config.weatherTomorrow) {
976
- const weatherTomorrowTextState = this.config.weatherTomorrowText ? await this.getForeignStateAsync(this.config.weatherTomorrowText) : null;
977
- const weatherTomorrowState = this.config.weatherTomorrow ? await this.getForeignStateAsync(this.config.weatherTomorrow) : null;
978
- const tempTomorrowState = this.config.weatherTomorrowTemp ? await this.getForeignStateAsync(this.config.weatherTomorrowTemp) : null;
979
-
980
- const weatherTomorrowText = weatherTomorrowTextState && weatherTomorrowTextState.val !== null ? weatherTomorrowTextState.val : null;
981
- const weatherTomorrow = weatherTomorrowState && weatherTomorrowState.val !== null ? weatherTomorrowState.val : null;
982
- const tempTomorrow = tempTomorrowState && tempTomorrowState.val !== null ? tempTomorrowState.val : null;
1021
+ const weatherTomorrowTextState = this.config.weatherTomorrowText
1022
+ ? await this.getForeignStateAsync(this.config.weatherTomorrowText)
1023
+ : null;
1024
+ const weatherTomorrowState = this.config.weatherTomorrow
1025
+ ? await this.getForeignStateAsync(this.config.weatherTomorrow)
1026
+ : null;
1027
+ const tempTomorrowState = this.config.weatherTomorrowTemp
1028
+ ? await this.getForeignStateAsync(this.config.weatherTomorrowTemp)
1029
+ : null;
1030
+
1031
+ const weatherTomorrowText =
1032
+ weatherTomorrowTextState && weatherTomorrowTextState.val !== null
1033
+ ? weatherTomorrowTextState.val
1034
+ : null;
1035
+ const weatherTomorrow =
1036
+ weatherTomorrowState && weatherTomorrowState.val !== null ? weatherTomorrowState.val : null;
1037
+ const tempTomorrow =
1038
+ tempTomorrowState && tempTomorrowState.val !== null ? tempTomorrowState.val : null;
983
1039
  const tempText = tempTomorrow ? ` ${this.round(tempTomorrow, 1)}°C` : '';
984
-
1040
+
985
1041
  const weatherText = weatherTomorrowText || weatherTomorrow;
986
1042
  if (weatherText) {
987
1043
  const weatherDesc = this.getWeatherDescription(weatherText);
@@ -1038,39 +1094,64 @@ class PvNotifications extends utils.Adapter {
1038
1094
  ${statusText}`;
1039
1095
 
1040
1096
  // Wetter-Prognose für morgen hinzufügen (optional, nur wenn weatherInIntermediate aktiv)
1041
- const weatherConfigured = this.config.weatherTomorrowText || this.config.weatherTomorrow || this.config.weatherTodayText || this.config.weatherTodayTemp;
1042
- this.log.debug(`Weather config: enabled=${this.config.weatherEnabled}, inIntermediate=${this.config.weatherInIntermediate}, configured=${weatherConfigured}`);
1043
- this.log.debug(`Weather data points: todayText="${this.config.weatherTodayText}", todayTemp="${this.config.weatherTodayTemp}", tomorrowText="${this.config.weatherTomorrowText}", tomorrow="${this.config.weatherTomorrow}", tomorrowTemp="${this.config.weatherTomorrowTemp}"`);
1044
-
1097
+ const weatherConfigured =
1098
+ this.config.weatherTomorrowText ||
1099
+ this.config.weatherTomorrow ||
1100
+ this.config.weatherTodayText ||
1101
+ this.config.weatherTodayTemp;
1102
+ this.log.debug(
1103
+ `Weather config: enabled=${this.config.weatherEnabled}, inIntermediate=${this.config.weatherInIntermediate}, configured=${weatherConfigured}`,
1104
+ );
1105
+ this.log.debug(
1106
+ `Weather data points: todayText="${this.config.weatherTodayText}", todayTemp="${this.config.weatherTodayTemp}", tomorrowText="${this.config.weatherTomorrowText}", tomorrow="${this.config.weatherTomorrow}", tomorrowTemp="${this.config.weatherTomorrowTemp}"`,
1107
+ );
1108
+
1045
1109
  if (this.config.weatherEnabled !== false && this.config.weatherInIntermediate !== false && weatherConfigured) {
1046
1110
  try {
1047
1111
  this.log.debug('Attempting to read weather data...');
1048
-
1112
+
1049
1113
  // Wetter heute lesen
1050
1114
  if (this.config.weatherTodayText || this.config.weatherTodayTemp) {
1051
- const weatherTodayTextState = this.config.weatherTodayText ? await this.getForeignStateAsync(this.config.weatherTodayText) : null;
1052
- const weatherTodayTempState = this.config.weatherTodayTemp ? await this.getForeignStateAsync(this.config.weatherTodayTemp) : null;
1053
-
1054
- const weatherTodayText = weatherTodayTextState && weatherTodayTextState.val !== null ? weatherTodayTextState.val : null;
1055
- const weatherTodayTemp = weatherTodayTempState && weatherTodayTempState.val !== null ? weatherTodayTempState.val : null;
1115
+ const weatherTodayTextState = this.config.weatherTodayText
1116
+ ? await this.getForeignStateAsync(this.config.weatherTodayText)
1117
+ : null;
1118
+ const weatherTodayTempState = this.config.weatherTodayTemp
1119
+ ? await this.getForeignStateAsync(this.config.weatherTodayTemp)
1120
+ : null;
1121
+
1122
+ const weatherTodayText =
1123
+ weatherTodayTextState && weatherTodayTextState.val !== null ? weatherTodayTextState.val : null;
1124
+ const weatherTodayTemp =
1125
+ weatherTodayTempState && weatherTodayTempState.val !== null ? weatherTodayTempState.val : null;
1056
1126
  const todayTempText = weatherTodayTemp ? ` ${this.round(weatherTodayTemp, 1)}°C` : '';
1057
-
1127
+
1058
1128
  if (weatherTodayText || weatherTodayTemp) {
1059
1129
  const weatherDesc = weatherTodayText ? this.getWeatherDescription(weatherTodayText) : '🌡️';
1060
1130
  message += `\n\n🌤️ ${this.translate('Weather today')}: ${weatherDesc}${todayTempText}`;
1061
1131
  this.log.info(`Weather today added to intermediate message: ${weatherDesc}${todayTempText}`);
1062
1132
  }
1063
1133
  }
1064
-
1134
+
1065
1135
  // Wetter morgen lesen
1066
1136
  if (this.config.weatherTomorrowText || this.config.weatherTomorrow) {
1067
- const weatherTomorrowTextState = this.config.weatherTomorrowText ? await this.getForeignStateAsync(this.config.weatherTomorrowText) : null;
1068
- const weatherTomorrowState = this.config.weatherTomorrow ? await this.getForeignStateAsync(this.config.weatherTomorrow) : null;
1069
- const tempTomorrowState = this.config.weatherTomorrowTemp ? await this.getForeignStateAsync(this.config.weatherTomorrowTemp) : null;
1070
-
1071
- const weatherTomorrowText = weatherTomorrowTextState && weatherTomorrowTextState.val !== null ? weatherTomorrowTextState.val : null;
1072
- const weatherTomorrow = weatherTomorrowState && weatherTomorrowState.val !== null ? weatherTomorrowState.val : null;
1073
- const tempTomorrow = tempTomorrowState && tempTomorrowState.val !== null ? tempTomorrowState.val : null;
1137
+ const weatherTomorrowTextState = this.config.weatherTomorrowText
1138
+ ? await this.getForeignStateAsync(this.config.weatherTomorrowText)
1139
+ : null;
1140
+ const weatherTomorrowState = this.config.weatherTomorrow
1141
+ ? await this.getForeignStateAsync(this.config.weatherTomorrow)
1142
+ : null;
1143
+ const tempTomorrowState = this.config.weatherTomorrowTemp
1144
+ ? await this.getForeignStateAsync(this.config.weatherTomorrowTemp)
1145
+ : null;
1146
+
1147
+ const weatherTomorrowText =
1148
+ weatherTomorrowTextState && weatherTomorrowTextState.val !== null
1149
+ ? weatherTomorrowTextState.val
1150
+ : null;
1151
+ const weatherTomorrow =
1152
+ weatherTomorrowState && weatherTomorrowState.val !== null ? weatherTomorrowState.val : null;
1153
+ const tempTomorrow =
1154
+ tempTomorrowState && tempTomorrowState.val !== null ? tempTomorrowState.val : null;
1074
1155
  const tempText = tempTomorrow ? ` ${this.round(tempTomorrow, 1)}°C` : '';
1075
1156
 
1076
1157
  const weatherText = weatherTomorrowText || weatherTomorrow;
@@ -1082,7 +1163,9 @@ ${statusText}`;
1082
1163
  }
1083
1164
  } catch (e) {
1084
1165
  this.log.error(`Weather data error: ${e.message}`);
1085
- this.log.error(`Config: weatherTodayText="${this.config.weatherTodayText}", weatherTomorrowText="${this.config.weatherTomorrowText}"`);
1166
+ this.log.error(
1167
+ `Config: weatherTodayText="${this.config.weatherTodayText}", weatherTomorrowText="${this.config.weatherTomorrowText}"`,
1168
+ );
1086
1169
  }
1087
1170
  } else {
1088
1171
  if (this.config.weatherEnabled === false) {
@@ -1092,7 +1175,9 @@ ${statusText}`;
1092
1175
  this.log.debug('Weather disabled for intermediate (weatherInIntermediate=false)');
1093
1176
  }
1094
1177
  if (!weatherConfigured) {
1095
- this.log.debug('Weather not configured (no weatherTodayText, weatherTodayTemp, weatherTomorrowText or weatherTomorrow)');
1178
+ this.log.debug(
1179
+ 'Weather not configured (no weatherTodayText, weatherTodayTemp, weatherTomorrowText or weatherTomorrow)',
1180
+ );
1096
1181
  }
1097
1182
  }
1098
1183
 
@@ -1135,15 +1220,22 @@ ${statusText}`;
1135
1220
  ⚡ ${this.translate('Grid consumption')}: ${gridPower} kWh`;
1136
1221
 
1137
1222
  // Wetter-Prognose für morgen hinzufügen (optional, nur wenn weatherInDailyStats aktiv)
1138
- if (this.config.weatherEnabled !== false && this.config.weatherInDailyStats !== false &&
1139
- (this.config.weatherTomorrowText || this.config.weatherTomorrow)) {
1223
+ if (
1224
+ this.config.weatherEnabled !== false &&
1225
+ this.config.weatherInDailyStats !== false &&
1226
+ (this.config.weatherTomorrowText || this.config.weatherTomorrow)
1227
+ ) {
1140
1228
  try {
1141
1229
  const weatherTomorrowTextState = await this.getForeignStateAsync(this.config.weatherTomorrowText);
1142
1230
  const weatherTomorrowState = await this.getForeignStateAsync(this.config.weatherTomorrow);
1143
1231
  const tempTomorrowState = await this.getForeignStateAsync(this.config.weatherTomorrowTemp);
1144
1232
 
1145
- const weatherTomorrowText = weatherTomorrowTextState && weatherTomorrowTextState.val !== null ? weatherTomorrowTextState.val : null;
1146
- const weatherTomorrow = weatherTomorrowState && weatherTomorrowState.val !== null ? weatherTomorrowState.val : null;
1233
+ const weatherTomorrowText =
1234
+ weatherTomorrowTextState && weatherTomorrowTextState.val !== null
1235
+ ? weatherTomorrowTextState.val
1236
+ : null;
1237
+ const weatherTomorrow =
1238
+ weatherTomorrowState && weatherTomorrowState.val !== null ? weatherTomorrowState.val : null;
1147
1239
  const tempTomorrow = tempTomorrowState && tempTomorrowState.val !== null ? tempTomorrowState.val : null;
1148
1240
  const tempText = tempTomorrow ? ` ${this.round(tempTomorrow, 1)}°C` : '';
1149
1241
 
@@ -1420,7 +1512,8 @@ ${statusText}`;
1420
1512
  const weeklyGridPower = await this.getForeignStateAsync(this.config.weeklyGridPower);
1421
1513
 
1422
1514
  this.stats.lastWeekProduction = weeklyProd && weeklyProd.val !== null ? weeklyProd.val : 0;
1423
- this.stats.lastWeekConsumption = weeklyConsumption && weeklyConsumption.val !== null ? weeklyConsumption.val : 0;
1515
+ this.stats.lastWeekConsumption =
1516
+ weeklyConsumption && weeklyConsumption.val !== null ? weeklyConsumption.val : 0;
1424
1517
  this.stats.lastWeekFeedIn = weeklyFeedIn && weeklyFeedIn.val !== null ? weeklyFeedIn.val : 0;
1425
1518
  this.stats.lastWeekGridPower = weeklyGridPower && weeklyGridPower.val !== null ? weeklyGridPower.val : 0;
1426
1519
  this.stats.lastWeekFullCycles = this.stats.weekFullCycles;
@@ -1431,7 +1524,9 @@ ${statusText}`;
1431
1524
  this.stats.weekEmptyCycles = 0;
1432
1525
 
1433
1526
  this.saveStatistics();
1434
- this.log.info(`Weekly stats saved: Production=${this.stats.lastWeekProduction} kWh, FeedIn=${this.stats.lastWeekFeedIn} kWh`);
1527
+ this.log.info(
1528
+ `Weekly stats saved: Production=${this.stats.lastWeekProduction} kWh, FeedIn=${this.stats.lastWeekFeedIn} kWh`,
1529
+ );
1435
1530
  // KEIN Senden hier - Senden erfolgt nur in startScheduledTasks() zur konfigurierten Zeit
1436
1531
  }
1437
1532
  }
@@ -1455,7 +1550,9 @@ ${statusText}`;
1455
1550
 
1456
1551
  // Automatische Speicherung: Letzter Tag des Monats um 23:55 (vor Mitternacht)
1457
1552
  if (today === lastDayOfMonth && hours === 23 && minutes === 55) {
1458
- this.log.info(`Auto-saving monthly statistics (last day of month ${today}. ${now.getMonth()+1}.${now.getFullYear()} 23:55, before sourceanalytix reset)`);
1553
+ this.log.info(
1554
+ `Auto-saving monthly statistics (last day of month ${today}. ${now.getMonth() + 1}.${now.getFullYear()} 23:55, before sourceanalytix reset)`,
1555
+ );
1459
1556
 
1460
1557
  // Aktuelle Daten aus externen States lesen (direkter Zugriff)
1461
1558
  const totalProd = await this.getForeignStateAsync(this.config.monthlyProduction);
@@ -1472,7 +1569,9 @@ ${statusText}`;
1472
1569
 
1473
1570
  this.stats.lastMonthReset = today;
1474
1571
  this.saveStatistics();
1475
- this.log.info(`Monthly stats saved: Production=${this.stats.lastMonthProduction} kWh, FeedIn=${this.stats.lastMonthFeedIn} kWh`);
1572
+ this.log.info(
1573
+ `Monthly stats saved: Production=${this.stats.lastMonthProduction} kWh, FeedIn=${this.stats.lastMonthFeedIn} kWh`,
1574
+ );
1476
1575
  }
1477
1576
  }
1478
1577
 
@@ -1719,8 +1818,10 @@ ${statusText}`;
1719
1818
  const weatherTodayTextState = await this.getForeignStateAsync(this.config.weatherTodayText);
1720
1819
  const weatherTodayState = await this.getForeignStateAsync(this.config.weatherTodayTemp);
1721
1820
 
1722
- const weatherTodayText = weatherTodayTextState && weatherTodayTextState.val !== null ? weatherTodayTextState.val : null;
1723
- const weatherTodayTemp = weatherTodayState && weatherTodayState.val !== null ? weatherTodayState.val : null;
1821
+ const weatherTodayText =
1822
+ weatherTodayTextState && weatherTodayTextState.val !== null ? weatherTodayTextState.val : null;
1823
+ const weatherTodayTemp =
1824
+ weatherTodayState && weatherTodayState.val !== null ? weatherTodayState.val : null;
1724
1825
  const tempText = weatherTodayTemp ? ` ${this.round(weatherTodayTemp, 1)}°C` : '';
1725
1826
 
1726
1827
  if (weatherTodayText || weatherTodayTemp) {
@@ -1734,12 +1835,18 @@ ${statusText}`;
1734
1835
  const weatherTomorrowTextState = await this.getForeignStateAsync(this.config.weatherTomorrowText);
1735
1836
  const weatherTomorrowState = await this.getForeignStateAsync(this.config.weatherTomorrowTemp);
1736
1837
 
1737
- const weatherTomorrowText = weatherTomorrowTextState && weatherTomorrowTextState.val !== null ? weatherTomorrowTextState.val : null;
1738
- const weatherTomorrowTemp = weatherTomorrowState && weatherTomorrowState.val !== null ? weatherTomorrowState.val : null;
1838
+ const weatherTomorrowText =
1839
+ weatherTomorrowTextState && weatherTomorrowTextState.val !== null
1840
+ ? weatherTomorrowTextState.val
1841
+ : null;
1842
+ const weatherTomorrowTemp =
1843
+ weatherTomorrowState && weatherTomorrowState.val !== null ? weatherTomorrowState.val : null;
1739
1844
  const tempText = weatherTomorrowTemp ? ` ${this.round(weatherTomorrowTemp, 1)}°C` : '';
1740
1845
 
1741
1846
  if (weatherTomorrowText || weatherTomorrowTemp) {
1742
- const weatherDesc = weatherTomorrowText ? this.getWeatherDescription(weatherTomorrowText) : '🌡️';
1847
+ const weatherDesc = weatherTomorrowText
1848
+ ? this.getWeatherDescription(weatherTomorrowText)
1849
+ : '🌡️';
1743
1850
  message += `\n🌤️ *${this.translate('Weather tomorrow')}:* ${weatherDesc}${tempText}`;
1744
1851
  }
1745
1852
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.pv-notifications",
3
- "version": "1.2.7",
3
+ "version": "1.2.9",
4
4
  "description": "PV-Anlage Batterie-Status Telegram Benachrichtigungen",
5
5
  "author": {
6
6
  "name": "Alex1808 via LLM: Qwen",