iobroker.pv-notifications 1.2.20 → 1.2.21

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 (3) hide show
  1. package/io-package.json +49 -38
  2. package/main.js +17 -17
  3. package/package.json +1 -1
package/io-package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "pv-notifications",
4
- "version": "1.2.20",
4
+ "version": "1.2.21",
5
5
  "titleLang": {
6
6
  "en": "PV Notifications",
7
7
  "de": "PV-Benachrichtigungen",
@@ -29,6 +29,18 @@
29
29
  "zh-cn": "发送 Telegram 通知用于 PV 电池状态"
30
30
  },
31
31
  "news": {
32
+ "1.2.21": {
33
+ "en": "Fix: use extendObject instead of setObjectNotExists for states with unit/role to update existing instances",
34
+ "de": "Fix: extendObject statt setObjectNotExists fuer States mit unit/role, um bestehende Instanzen zu aktualisieren",
35
+ "ru": "Fix: extendObject вместо setObjectNotExists для states с unit/role, чтобы обновить существующие инстанции",
36
+ "fr": "Fix: extendObject au lieu de setObjectNotExists pour les states avec unit/role afin de mettre a jour les instances existantes",
37
+ "it": "Fix: extendObject invece di setObjectNotExists per states con unit/role per aggiornare le istanze esistenti",
38
+ "es": "Fix: extendObject en lugar de setObjectNotExists para states con unit/role para actualizar instancias existentes",
39
+ "pl": "Fix: extendObject zamiast setObjectNotExists dla states z unit/role aby zaktualizowac istniejace instancje",
40
+ "pt": "Fix: extendObject em vez de setObjectNotExists para states com unit/role para atualizar instancias existentes",
41
+ "nl": "Fix: extendObject in plaats van setObjectNotExists voor states met unit/role om bestaande instanties bij te werken",
42
+ "zh-cn": "修复:对带有 unit/role 的 state 使用 extendObject 而非 setObjectNotExists,以更新现有实例"
43
+ },
32
44
  "1.2.20": {
33
45
  "en": "Fix PR#5576: remove unused admin files, reduce info logs to debug, English state names with units, channel objects for statistics/info, button read:false, this.setInterval, translate fallback to English",
34
46
  "de": "Fix PR#5576: ungenutzte Admin-Dateien entfernt, Info-Logs auf Debug reduziert, englische State-Namen mit Einheiten, Channel-Objekte fuer statistics/info, button read:false, this.setInterval, translate Fallback auf Englisch",
@@ -105,19 +117,6 @@
105
117
  "pl": "Dodano linie oddzielające do wiadomości o pełnej/pustej baterii i pośrednich dla lepszej czytelności",
106
118
  "uk": "Додано розділювальні лінії до повідомлень про повну/порожню батарею та проміжних для покращення читабельності",
107
119
  "zh-cn": "已添加分隔线到电池满/空和中间消息以提高可读性"
108
- },
109
- "1.2.14": {
110
- "en": "Fixed intermediate message formatting: Removed extra line break before weather data",
111
- "de": "Intermediate-Nachricht formatiert: Zusätzlichen Zeilenumbruch vor Wetterdaten entfernt",
112
- "ru": "Исправлено форматирование промежуточного сообщения: удалён лишний перенос строки перед данными погоды",
113
- "pt": "Corrigida formatação da mensagem intermediária: Removida quebra de linha extra antes dos dados meteorológicos",
114
- "nl": "Formattering tussentijds bericht gecorrigeerd: extra regeleis voor weergegevens verwijderd",
115
- "fr": "Correction du formatage des messages intermédiaires: suppression du saut de ligne supplémentaire avant les données météo",
116
- "it": "Corretta formattazione messaggio intermedio: rimossa interruzione di riga extra prima dei dati meteo",
117
- "es": "Corregido formato de mensaje intermedio: Eliminada salto de línea adicional antes de datos meteorológicos",
118
- "pl": "Poprawiono formatowanie wiadomości pośrednich: Usunięto dodatkowy podział wiersza przed danymi pogodowymi",
119
- "uk": "Виправлено форматування проміжних повідомлень: видалено додатковий перенос рядка перед даними погоди",
120
- "zh-cn": "修复中间消息格式:删除天气数据前的额外换行符"
121
120
  }
122
121
  },
123
122
  "authors": [
@@ -272,10 +271,11 @@
272
271
  "common": {
273
272
  "name": "Max SOC today",
274
273
  "type": "number",
275
- "role": "value",
274
+ "role": "value.battery",
276
275
  "read": true,
277
276
  "write": false,
278
- "def": 0
277
+ "def": 0,
278
+ "unit": "%"
279
279
  }
280
280
  },
281
281
  {
@@ -284,10 +284,11 @@
284
284
  "common": {
285
285
  "name": "Min SOC today",
286
286
  "type": "number",
287
- "role": "value",
287
+ "role": "value.battery",
288
288
  "read": true,
289
289
  "write": false,
290
- "def": 100
290
+ "def": 100,
291
+ "unit": "%"
291
292
  }
292
293
  },
293
294
  {
@@ -320,10 +321,11 @@
320
321
  "common": {
321
322
  "name": "Current SOC",
322
323
  "type": "number",
323
- "role": "value",
324
+ "role": "value.battery",
324
325
  "read": true,
325
326
  "write": false,
326
- "def": 0
327
+ "def": 0,
328
+ "unit": "%"
327
329
  }
328
330
  },
329
331
  {
@@ -332,10 +334,11 @@
332
334
  "common": {
333
335
  "name": "Current energy in kWh",
334
336
  "type": "number",
335
- "role": "value",
337
+ "role": "value.energy",
336
338
  "read": true,
337
339
  "write": false,
338
- "def": 0
340
+ "def": 0,
341
+ "unit": "kWh"
339
342
  }
340
343
  },
341
344
  {
@@ -344,10 +347,11 @@
344
347
  "common": {
345
348
  "name": "Production last month",
346
349
  "type": "number",
347
- "role": "value",
350
+ "role": "value.energy",
348
351
  "read": true,
349
352
  "write": false,
350
- "def": 0
353
+ "def": 0,
354
+ "unit": "kWh"
351
355
  }
352
356
  },
353
357
  {
@@ -356,10 +360,11 @@
356
360
  "common": {
357
361
  "name": "Consumption last month",
358
362
  "type": "number",
359
- "role": "value",
363
+ "role": "value.energy",
360
364
  "read": true,
361
365
  "write": false,
362
- "def": 0
366
+ "def": 0,
367
+ "unit": "kWh"
363
368
  }
364
369
  },
365
370
  {
@@ -368,10 +373,11 @@
368
373
  "common": {
369
374
  "name": "Feed-in last month",
370
375
  "type": "number",
371
- "role": "value",
376
+ "role": "value.energy",
372
377
  "read": true,
373
378
  "write": false,
374
- "def": 0
379
+ "def": 0,
380
+ "unit": "kWh"
375
381
  }
376
382
  },
377
383
  {
@@ -380,10 +386,11 @@
380
386
  "common": {
381
387
  "name": "Grid power last month",
382
388
  "type": "number",
383
- "role": "value",
389
+ "role": "value.energy",
384
390
  "read": true,
385
391
  "write": false,
386
- "def": 0
392
+ "def": 0,
393
+ "unit": "kWh"
387
394
  }
388
395
  },
389
396
  {
@@ -416,10 +423,11 @@
416
423
  "common": {
417
424
  "name": "Production last week",
418
425
  "type": "number",
419
- "role": "value",
426
+ "role": "value.energy",
420
427
  "read": true,
421
428
  "write": false,
422
- "def": 0
429
+ "def": 0,
430
+ "unit": "kWh"
423
431
  }
424
432
  },
425
433
  {
@@ -428,10 +436,11 @@
428
436
  "common": {
429
437
  "name": "Consumption last week",
430
438
  "type": "number",
431
- "role": "value",
439
+ "role": "value.energy",
432
440
  "read": true,
433
441
  "write": false,
434
- "def": 0
442
+ "def": 0,
443
+ "unit": "kWh"
435
444
  }
436
445
  },
437
446
  {
@@ -440,10 +449,11 @@
440
449
  "common": {
441
450
  "name": "Feed-in last week",
442
451
  "type": "number",
443
- "role": "value",
452
+ "role": "value.energy",
444
453
  "read": true,
445
454
  "write": false,
446
- "def": 0
455
+ "def": 0,
456
+ "unit": "kWh"
447
457
  }
448
458
  },
449
459
  {
@@ -452,10 +462,11 @@
452
462
  "common": {
453
463
  "name": "Grid power last week",
454
464
  "type": "number",
455
- "role": "value",
465
+ "role": "value.energy",
456
466
  "read": true,
457
467
  "write": false,
458
- "def": 0
468
+ "def": 0,
469
+ "unit": "kWh"
459
470
  }
460
471
  },
461
472
  {
package/main.js CHANGED
@@ -123,11 +123,11 @@ class PvNotifications extends utils.Adapter {
123
123
  type: 'state',
124
124
  common: { name: 'Empty cycles today', type: 'number', role: 'value', read: true, write: false, def: 0 },
125
125
  });
126
- await this.setObjectNotExists('statistics.maxSOCToday', {
126
+ await this.extendObject('statistics.maxSOCToday', {
127
127
  type: 'state',
128
128
  common: { name: 'Max SOC today', type: 'number', role: 'value.battery', read: true, write: false, def: 0, unit: '%' },
129
129
  });
130
- await this.setObjectNotExists('statistics.minSOCToday', {
130
+ await this.extendObject('statistics.minSOCToday', {
131
131
  type: 'state',
132
132
  common: { name: 'Min SOC today', type: 'number', role: 'value.battery', read: true, write: false, def: 100, unit: '%' },
133
133
  });
@@ -139,11 +139,11 @@ class PvNotifications extends utils.Adapter {
139
139
  type: 'state',
140
140
  common: { name: 'Empty cycles this week', type: 'number', role: 'value', read: true, write: false, def: 0 },
141
141
  });
142
- await this.setObjectNotExists('statistics.currentSOC', {
142
+ await this.extendObject('statistics.currentSOC', {
143
143
  type: 'state',
144
144
  common: { name: 'Current SOC', type: 'number', role: 'value.battery', read: true, write: false, def: 0, unit: '%' },
145
145
  });
146
- await this.setObjectNotExists('statistics.currentEnergyKWh', {
146
+ await this.extendObject('statistics.currentEnergyKWh', {
147
147
  type: 'state',
148
148
  common: {
149
149
  name: 'Current energy',
@@ -155,11 +155,11 @@ class PvNotifications extends utils.Adapter {
155
155
  unit: 'kWh',
156
156
  },
157
157
  });
158
- await this.setObjectNotExists('statistics.currentPower', {
158
+ await this.extendObject('statistics.currentPower', {
159
159
  type: 'state',
160
160
  common: { name: 'Current power', type: 'number', role: 'value.power', read: true, write: false, def: 0, unit: 'W' },
161
161
  });
162
- await this.setObjectNotExists('statistics.currentTotalProduction', {
162
+ await this.extendObject('statistics.currentTotalProduction', {
163
163
  type: 'state',
164
164
  common: {
165
165
  name: 'Total production today',
@@ -171,21 +171,21 @@ class PvNotifications extends utils.Adapter {
171
171
  unit: 'kWh',
172
172
  },
173
173
  });
174
- await this.setObjectNotExists('statistics.currentFeedIn', {
174
+ await this.extendObject('statistics.currentFeedIn', {
175
175
  type: 'state',
176
176
  common: { name: 'Feed-in today', type: 'number', role: 'value.energy', read: true, write: false, def: 0, unit: 'kWh' },
177
177
  });
178
- await this.setObjectNotExists('statistics.currentConsumption', {
178
+ await this.extendObject('statistics.currentConsumption', {
179
179
  type: 'state',
180
180
  common: { name: 'Consumption today', type: 'number', role: 'value.energy', read: true, write: false, def: 0, unit: 'kWh' },
181
181
  });
182
- await this.setObjectNotExists('statistics.currentGridPower', {
182
+ await this.extendObject('statistics.currentGridPower', {
183
183
  type: 'state',
184
184
  common: { name: 'Grid power today', type: 'number', role: 'value.energy', read: true, write: false, def: 0, unit: 'kWh' },
185
185
  });
186
186
 
187
187
  // States für letzte Monats-/Wochenstatistik
188
- await this.setObjectNotExists('statistics.lastMonthProduction', {
188
+ await this.extendObject('statistics.lastMonthProduction', {
189
189
  type: 'state',
190
190
  common: {
191
191
  name: 'Production last month',
@@ -197,7 +197,7 @@ class PvNotifications extends utils.Adapter {
197
197
  unit: 'kWh',
198
198
  },
199
199
  });
200
- await this.setObjectNotExists('statistics.lastMonthConsumption', {
200
+ await this.extendObject('statistics.lastMonthConsumption', {
201
201
  type: 'state',
202
202
  common: {
203
203
  name: 'Consumption last month',
@@ -209,7 +209,7 @@ class PvNotifications extends utils.Adapter {
209
209
  unit: 'kWh',
210
210
  },
211
211
  });
212
- await this.setObjectNotExists('statistics.lastMonthFeedIn', {
212
+ await this.extendObject('statistics.lastMonthFeedIn', {
213
213
  type: 'state',
214
214
  common: {
215
215
  name: 'Feed-in last month',
@@ -221,7 +221,7 @@ class PvNotifications extends utils.Adapter {
221
221
  unit: 'kWh',
222
222
  },
223
223
  });
224
- await this.setObjectNotExists('statistics.lastMonthGridPower', {
224
+ await this.extendObject('statistics.lastMonthGridPower', {
225
225
  type: 'state',
226
226
  common: {
227
227
  name: 'Grid power last month',
@@ -255,7 +255,7 @@ class PvNotifications extends utils.Adapter {
255
255
  def: 0,
256
256
  },
257
257
  });
258
- await this.setObjectNotExists('statistics.lastWeekProduction', {
258
+ await this.extendObject('statistics.lastWeekProduction', {
259
259
  type: 'state',
260
260
  common: {
261
261
  name: 'Production last week',
@@ -267,11 +267,11 @@ class PvNotifications extends utils.Adapter {
267
267
  unit: 'kWh',
268
268
  },
269
269
  });
270
- await this.setObjectNotExists('statistics.lastWeekConsumption', {
270
+ await this.extendObject('statistics.lastWeekConsumption', {
271
271
  type: 'state',
272
272
  common: { name: 'Consumption last week', type: 'number', role: 'value.energy', read: true, write: false, def: 0, unit: 'kWh' },
273
273
  });
274
- await this.setObjectNotExists('statistics.lastWeekFeedIn', {
274
+ await this.extendObject('statistics.lastWeekFeedIn', {
275
275
  type: 'state',
276
276
  common: {
277
277
  name: 'Feed-in last week',
@@ -283,7 +283,7 @@ class PvNotifications extends utils.Adapter {
283
283
  unit: 'kWh',
284
284
  },
285
285
  });
286
- await this.setObjectNotExists('statistics.lastWeekGridPower', {
286
+ await this.extendObject('statistics.lastWeekGridPower', {
287
287
  type: 'state',
288
288
  common: { name: 'Grid power last week', type: 'number', role: 'value.energy', read: true, write: false, def: 0, unit: 'kWh' },
289
289
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.pv-notifications",
3
- "version": "1.2.20",
3
+ "version": "1.2.21",
4
4
  "description": "PV-Anlage Batterie-Status Telegram Benachrichtigungen",
5
5
  "author": {
6
6
  "name": "Alex1808 via LLM: Qwen",