iobroker.zendure-solarflow 1.1.11 → 1.1.13

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.
@@ -18,742 +18,14 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var adapterService_exports = {};
20
20
  __export(adapterService_exports, {
21
- addOrUpdatePackData: () => addOrUpdatePackData,
22
- calculateEnergy: () => calculateEnergy,
23
- createSolarFlowStates: () => createSolarFlowStates,
24
- resetTodaysValues: () => resetTodaysValues,
25
- startCheckStatesTimer: () => startCheckStatesTimer,
26
21
  updateSolarFlowState: () => updateSolarFlowState
27
22
  });
28
23
  module.exports = __toCommonJS(adapterService_exports);
29
- var import_webService = require("./webService");
30
- const createCalculationStates = async (adapter, productKey, deviceKey) => {
31
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
32
- productKey + "." + deviceKey + ".calculations.solarInputEnergyTodayWh",
33
- {
34
- type: "state",
35
- common: {
36
- name: {
37
- de: "Heutiger Solarertrag (Wh)",
38
- en: "Todays solar input (Wh)"
39
- },
40
- type: "number",
41
- desc: "solarInputEnergyTodayWh",
42
- role: "value.energy",
43
- read: true,
44
- write: false,
45
- unit: "Wh"
46
- },
47
- native: {}
48
- }
49
- ));
50
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
51
- productKey + "." + deviceKey + ".calculations.solarInputEnergyTodaykWh",
52
- {
53
- type: "state",
54
- common: {
55
- name: {
56
- de: "Heutiger Solarertrag (kWh)",
57
- en: "Todays solar input (kWh)"
58
- },
59
- type: "number",
60
- desc: "solarInputEnergyTodaykWh",
61
- role: "value.energy",
62
- read: true,
63
- write: false,
64
- unit: "kWh"
65
- },
66
- native: {}
67
- }
68
- ));
69
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
70
- productKey + "." + deviceKey + ".calculations.outputPackEnergyTodayWh",
71
- {
72
- type: "state",
73
- common: {
74
- name: {
75
- de: "Heutige Ladung zum Akku (Wh)",
76
- en: "todays charge energy to battery (Wh)"
77
- },
78
- type: "number",
79
- desc: "outputPackEnergyTodayWh",
80
- role: "value.energy",
81
- read: true,
82
- write: false,
83
- unit: "Wh"
84
- },
85
- native: {}
86
- }
87
- ));
88
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
89
- productKey + "." + deviceKey + ".calculations.outputPackEnergyTodaykWh",
90
- {
91
- type: "state",
92
- common: {
93
- name: {
94
- de: "Heutige Ladung zum Akku (kWh)",
95
- en: "todays charge energy to battery (kWh)"
96
- },
97
- type: "number",
98
- desc: "outputPackEnergyTodaykWh",
99
- role: "value.energy",
100
- read: true,
101
- write: false,
102
- unit: "kWh"
103
- },
104
- native: {}
105
- }
106
- ));
107
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
108
- productKey + "." + deviceKey + ".calculations.packInputEnergyTodayWh",
109
- {
110
- type: "state",
111
- common: {
112
- name: {
113
- de: "Heutige Ladung zum Akku (Wh)",
114
- en: "todays charge energy to battery (Wh)"
115
- },
116
- type: "number",
117
- desc: "packInputEnergyTodayWh",
118
- role: "value.energy",
119
- read: true,
120
- write: false,
121
- unit: "Wh"
122
- },
123
- native: {}
124
- }
125
- ));
126
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
127
- productKey + "." + deviceKey + ".calculations.packInputEnergyTodaykWh",
128
- {
129
- type: "state",
130
- common: {
131
- name: {
132
- de: "Heutige Einspeisung aus Akku (kWh)",
133
- en: "Todays discharge energy from battery (kWh)"
134
- },
135
- type: "number",
136
- desc: "packInputEnergyTodaykWh",
137
- role: "value.energy",
138
- read: true,
139
- write: false,
140
- unit: "kWh"
141
- },
142
- native: {}
143
- }
144
- ));
145
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
146
- productKey + "." + deviceKey + ".calculations.outputHomeEnergyTodayWh",
147
- {
148
- type: "state",
149
- common: {
150
- name: {
151
- de: "Heutige Einspeisung ins Haus (Wh)",
152
- en: "Todays input energy to home (Wh)"
153
- },
154
- type: "number",
155
- desc: "outputHomeEnergyTodayWh",
156
- role: "value.energy",
157
- read: true,
158
- write: false,
159
- unit: "Wh"
160
- },
161
- native: {}
162
- }
163
- ));
164
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
165
- productKey + "." + deviceKey + ".calculations.outputHomeEnergyTodaykWh",
166
- {
167
- type: "state",
168
- common: {
169
- name: {
170
- de: "Heutige Einspeisung ins Haus (kWh)",
171
- en: "Todays input energy to home (kWh)"
172
- },
173
- type: "number",
174
- desc: "outputHomeEnergyTodaykWh",
175
- role: "value.energy",
176
- read: true,
177
- write: false,
178
- unit: "kWh"
179
- },
180
- native: {}
181
- }
182
- ));
183
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
184
- productKey + "." + deviceKey + ".calculations.remainInputTime",
185
- {
186
- type: "state",
187
- common: {
188
- name: {
189
- de: "Erwartete Ladedauer (hh:mm)",
190
- en: "remaining charge time (hh:mm)"
191
- },
192
- type: "string",
193
- desc: "calcRemainInputTime",
194
- role: "value",
195
- read: true,
196
- write: false
197
- },
198
- native: {}
199
- }
200
- ));
201
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
202
- productKey + "." + deviceKey + ".calculations.remainOutTime",
203
- {
204
- type: "state",
205
- common: {
206
- name: {
207
- de: "Erwartete Entladedauer (hh:mm)",
208
- en: "remaining discharge time (hh:mm)"
209
- },
210
- type: "string",
211
- desc: "calcRemainOutTime",
212
- role: "value",
213
- read: true,
214
- write: false
215
- },
216
- native: {}
217
- }
218
- ));
219
- };
220
- const createControlStates = async (adapter, productKey, deviceKey) => {
221
- await (adapter == null ? void 0 : adapter.extendObjectAsync(productKey + "." + deviceKey + ".control", {
222
- type: "channel",
223
- common: {
224
- name: {
225
- de: "Steuerung f\xFCr Ger\xE4t " + deviceKey,
226
- en: "Control for device " + deviceKey
227
- }
228
- },
229
- native: {}
230
- }));
231
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
232
- productKey + "." + deviceKey + ".control.setOutputLimit",
233
- {
234
- type: "state",
235
- common: {
236
- name: {
237
- de: "Einzustellende Ausgangsleistung",
238
- en: "Control of the output limit"
239
- },
240
- type: "number",
241
- desc: "setOutputLimit",
242
- role: "value.power",
243
- read: true,
244
- write: true,
245
- min: 0,
246
- unit: "W"
247
- },
248
- native: {}
249
- }
250
- ));
251
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
252
- productKey + "." + deviceKey + ".control.chargeLimit",
253
- {
254
- type: "state",
255
- common: {
256
- name: {
257
- de: "Setzen des Lade-Limits",
258
- en: "Control of the charge limit"
259
- },
260
- type: "number",
261
- desc: "chargeLimit",
262
- role: "value.battery",
263
- read: true,
264
- write: true,
265
- min: 40,
266
- max: 100,
267
- unit: "%"
268
- },
269
- native: {}
270
- }
271
- ));
272
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
273
- productKey + "." + deviceKey + ".control.dischargeLimit",
274
- {
275
- type: "state",
276
- common: {
277
- name: {
278
- de: "Setzen des Entlade-Limits",
279
- en: "Control of the discharge limit"
280
- },
281
- type: "number",
282
- desc: "dischargeLimit",
283
- role: "value.battery",
284
- read: true,
285
- write: true,
286
- min: 0,
287
- max: 90,
288
- unit: "%"
289
- },
290
- native: {}
291
- }
292
- ));
293
- adapter == null ? void 0 : adapter.subscribeStates(
294
- productKey + "." + deviceKey + ".control.setOutputLimit"
295
- );
296
- adapter == null ? void 0 : adapter.subscribeStates(
297
- productKey + "." + deviceKey + ".control.chargeLimit"
298
- );
299
- adapter == null ? void 0 : adapter.subscribeStates(
300
- productKey + "." + deviceKey + ".control.dischargeLimit"
301
- );
302
- };
303
- const createSolarFlowStates = async (adapter, productKey, deviceKey) => {
304
- productKey = productKey.replace(adapter.FORBIDDEN_CHARS, "");
305
- deviceKey = deviceKey.replace(adapter.FORBIDDEN_CHARS, "");
306
- await (adapter == null ? void 0 : adapter.extendObjectAsync(productKey, {
307
- type: "device",
308
- common: {
309
- name: { de: "Produkt " + productKey, en: "Product " + productKey }
310
- },
311
- native: {}
312
- }));
313
- await (adapter == null ? void 0 : adapter.extendObjectAsync(productKey + "." + deviceKey, {
314
- type: "channel",
315
- common: {
316
- name: { de: "Device Key " + deviceKey, en: "Device Key " + deviceKey }
317
- },
318
- native: {}
319
- }));
320
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
321
- productKey + "." + deviceKey + ".calculations",
322
- {
323
- type: "channel",
324
- common: {
325
- name: {
326
- de: "Berechnungen f\xFCr Ger\xE4t " + deviceKey,
327
- en: "Calculations for Device " + deviceKey
328
- }
329
- },
330
- native: {}
331
- }
332
- ));
333
- await (adapter == null ? void 0 : adapter.extendObjectAsync(productKey + "." + deviceKey + ".packData", {
334
- type: "channel",
335
- common: {
336
- name: {
337
- de: "Akku Packs",
338
- en: "Battery packs"
339
- }
340
- },
341
- native: {}
342
- }));
343
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
344
- productKey + "." + deviceKey + ".lastUpdate",
345
- {
346
- type: "state",
347
- common: {
348
- name: { de: "Letztes Update", en: "Last Update" },
349
- type: "number",
350
- desc: "lastUpdate",
351
- role: "value.time",
352
- read: true,
353
- write: false
354
- },
355
- native: {}
356
- }
357
- ));
358
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
359
- productKey + "." + deviceKey + ".electricLevel",
360
- {
361
- type: "state",
362
- common: {
363
- name: { de: "SOC Gesamtsystem", en: "SOC of the system" },
364
- type: "number",
365
- desc: "electricLevel",
366
- role: "value.battery",
367
- read: true,
368
- write: false,
369
- unit: "%"
370
- },
371
- native: {}
372
- }
373
- ));
374
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
375
- productKey + "." + deviceKey + ".outputHomePower",
376
- {
377
- type: "state",
378
- common: {
379
- name: { de: "Ausgangsleistung", en: "output power" },
380
- type: "number",
381
- desc: "outputHomePower",
382
- role: "value.power",
383
- read: true,
384
- write: false,
385
- unit: "W"
386
- },
387
- native: {}
388
- }
389
- ));
390
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
391
- productKey + "." + deviceKey + ".outputLimit",
392
- {
393
- type: "state",
394
- common: {
395
- name: { de: "Limit der Ausgangsleistung", en: "limit of output power" },
396
- type: "number",
397
- desc: "outputLimit",
398
- role: "value.power",
399
- read: true,
400
- write: false,
401
- unit: "W"
402
- },
403
- native: {}
404
- }
405
- ));
406
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
407
- productKey + "." + deviceKey + ".outputPackPower",
408
- {
409
- type: "state",
410
- common: {
411
- name: { de: "Ladeleistung zum Akku", en: "charge power" },
412
- type: "number",
413
- desc: "outputPackPower",
414
- role: "value.power",
415
- read: true,
416
- write: false,
417
- unit: "W"
418
- },
419
- native: {}
420
- }
421
- ));
422
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
423
- productKey + "." + deviceKey + ".packInputPower",
424
- {
425
- type: "state",
426
- common: {
427
- name: { de: "Entladeleistung zum Akku", en: "discharge power" },
428
- type: "number",
429
- desc: "packInputPower",
430
- role: "value.power",
431
- read: true,
432
- write: false,
433
- unit: "W"
434
- },
435
- native: {}
436
- }
437
- ));
438
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
439
- productKey + "." + deviceKey + ".solarInputPower",
440
- {
441
- type: "state",
442
- common: {
443
- name: { de: "Leistung der Solarmodule", en: "solar power" },
444
- type: "number",
445
- desc: "solarInputPower",
446
- role: "value.power",
447
- read: true,
448
- write: false,
449
- unit: "W"
450
- },
451
- native: {}
452
- }
453
- ));
454
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
455
- productKey + "." + deviceKey + ".pvPower1",
456
- {
457
- type: "state",
458
- common: {
459
- name: { de: "Leistung PV 1", en: "solar power channel 1" },
460
- type: "number",
461
- desc: "pvPower1",
462
- role: "value.power",
463
- read: true,
464
- write: false,
465
- unit: "W"
466
- },
467
- native: {}
468
- }
469
- ));
470
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
471
- productKey + "." + deviceKey + ".pvPower2",
472
- {
473
- type: "state",
474
- common: {
475
- name: { de: "Leistung PV 2", en: "solar power channel 2" },
476
- type: "number",
477
- desc: "pvPower2",
478
- role: "value.power",
479
- read: true,
480
- write: false,
481
- unit: "W"
482
- },
483
- native: {}
484
- }
485
- ));
486
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
487
- productKey + "." + deviceKey + ".remainInputTime",
488
- {
489
- type: "state",
490
- common: {
491
- name: { de: "Erwartete Ladedauer", en: "remaining charge time" },
492
- type: "number",
493
- desc: "remainInputTime",
494
- role: "value.interval",
495
- read: true,
496
- write: false
497
- },
498
- native: {}
499
- }
500
- ));
501
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
502
- productKey + "." + deviceKey + ".remainOutTime",
503
- {
504
- type: "state",
505
- common: {
506
- name: {
507
- de: "Erwartete Entladedauer (Minuten)",
508
- en: "remaining discharge time (minutes)"
509
- },
510
- type: "number",
511
- desc: "remainOutTime",
512
- role: "value.interval",
513
- read: true,
514
- write: false
515
- },
516
- native: {}
517
- }
518
- ));
519
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
520
- productKey + "." + deviceKey + ".socSet",
521
- {
522
- type: "state",
523
- common: {
524
- name: { de: "Max. SOC", en: "max. SOC" },
525
- type: "number",
526
- desc: "socSet",
527
- role: "value.battery",
528
- read: true,
529
- write: false,
530
- unit: "%"
531
- },
532
- native: {}
533
- }
534
- ));
535
- await (adapter == null ? void 0 : adapter.extendObjectAsync(
536
- productKey + "." + deviceKey + ".minSoc",
537
- {
538
- type: "state",
539
- common: {
540
- name: { de: "Min. SOC", en: "min. SOC" },
541
- type: "number",
542
- desc: "minSoc",
543
- role: "value.battery",
544
- read: true,
545
- write: false,
546
- unit: "%"
547
- },
548
- native: {}
549
- }
550
- ));
551
- adapter == null ? void 0 : adapter.subscribeStates(
552
- productKey + "." + deviceKey + ".solarInputPower"
553
- );
554
- adapter == null ? void 0 : adapter.subscribeStates(
555
- productKey + "." + deviceKey + ".outputPackPower"
556
- );
557
- adapter == null ? void 0 : adapter.subscribeStates(
558
- productKey + "." + deviceKey + ".packInputPower"
559
- );
560
- adapter == null ? void 0 : adapter.subscribeStates(
561
- productKey + "." + deviceKey + ".outputHomePower"
562
- );
563
- await createControlStates(adapter, productKey, deviceKey);
564
- await createCalculationStates(adapter, productKey, deviceKey);
565
- };
566
- const addOrUpdatePackData = async (adapter, productKey, deviceKey, packData) => {
567
- await packData.forEach(async (x) => {
568
- if (x.sn) {
569
- const key = (productKey + "." + deviceKey + ".packData." + x.sn).replace(
570
- adapter.FORBIDDEN_CHARS,
571
- ""
572
- );
573
- await (adapter == null ? void 0 : adapter.extendObjectAsync(key + ".sn", {
574
- type: "state",
575
- common: {
576
- name: {
577
- de: "Seriennummer",
578
- en: "Serial id"
579
- },
580
- type: "string",
581
- desc: "Serial ID",
582
- role: "value",
583
- read: true,
584
- write: false
585
- },
586
- native: {}
587
- }));
588
- await (adapter == null ? void 0 : adapter.setStateAsync(key + ".sn", x.sn, true));
589
- if (x.socLevel) {
590
- await (adapter == null ? void 0 : adapter.extendObjectAsync(key + ".socLevel", {
591
- type: "state",
592
- common: {
593
- name: {
594
- de: "SOC der Batterie",
595
- en: "soc of battery"
596
- },
597
- type: "number",
598
- desc: "SOC Level",
599
- role: "value",
600
- read: true,
601
- write: false
602
- },
603
- native: {}
604
- }));
605
- await (adapter == null ? void 0 : adapter.setStateAsync(key + ".socLevel", x.socLevel, true));
606
- }
607
- if (x.maxTemp) {
608
- await (adapter == null ? void 0 : adapter.extendObjectAsync(key + ".maxTemp", {
609
- type: "state",
610
- common: {
611
- name: {
612
- de: "Max. Temperatur der Batterie",
613
- en: "max temp. of battery"
614
- },
615
- type: "number",
616
- desc: "Max. Temp",
617
- role: "value",
618
- read: true,
619
- write: false
620
- },
621
- native: {}
622
- }));
623
- await (adapter == null ? void 0 : adapter.setStateAsync(
624
- key + ".maxTemp",
625
- x.maxTemp / 10 - 273.15,
626
- true
627
- ));
628
- }
629
- if (x.minVol) {
630
- await (adapter == null ? void 0 : adapter.extendObjectAsync(key + ".minVol", {
631
- type: "state",
632
- common: {
633
- name: "minVol",
634
- type: "number",
635
- desc: "minVol",
636
- role: "value",
637
- read: true,
638
- write: false
639
- },
640
- native: {}
641
- }));
642
- await (adapter == null ? void 0 : adapter.setStateAsync(key + ".minVol", x.minVol / 100, true));
643
- }
644
- if (x.maxVol) {
645
- await (adapter == null ? void 0 : adapter.extendObjectAsync(key + ".maxVol", {
646
- type: "state",
647
- common: {
648
- name: "maxVol",
649
- type: "number",
650
- desc: "maxVol",
651
- role: "value",
652
- read: true,
653
- write: false
654
- },
655
- native: {}
656
- }));
657
- await (adapter == null ? void 0 : adapter.setStateAsync(key + ".maxVol", x.maxVol / 100, true));
658
- }
659
- if (x.totalVol) {
660
- await (adapter == null ? void 0 : adapter.extendObjectAsync(key + ".totalVol", {
661
- type: "state",
662
- common: {
663
- name: "totalVol",
664
- type: "number",
665
- desc: "totalVol",
666
- role: "value",
667
- read: true,
668
- write: false
669
- },
670
- native: {}
671
- }));
672
- await (adapter == null ? void 0 : adapter.setStateAsync(key + ".totalVol", x.totalVol / 100, true));
673
- }
674
- }
675
- });
676
- };
677
- const startCheckStatesTimer = async (adapter) => {
678
- const statesToReset = [
679
- "outputHomePower",
680
- "outputPackPower",
681
- "packInputPower",
682
- "solarInputPower"
683
- ];
684
- adapter.interval = adapter.setInterval(async () => {
685
- (0, import_webService.getDeviceList)(adapter).then((deviceList) => {
686
- deviceList.forEach(async (device) => {
687
- const lastUpdate = await (adapter == null ? void 0 : adapter.getStateAsync(
688
- device.productKey + "." + device.deviceKey + ".lastUpdate"
689
- ));
690
- const tenMinutesAgo = Date.now() / 1e3 - 10 * 60;
691
- if (lastUpdate && lastUpdate.val && Number(lastUpdate.val) < tenMinutesAgo) {
692
- adapter.log.debug(
693
- `Last update for deviceKey ${device.deviceKey} was at ${new Date(
694
- Number(lastUpdate)
695
- )}, checking for pseudo power values!`
696
- );
697
- await statesToReset.forEach(async (stateName) => {
698
- await (adapter == null ? void 0 : adapter.setStateAsync(
699
- device.productKey + "." + device.deviceKey + "." + stateName,
700
- 0,
701
- true
702
- ));
703
- });
704
- await (adapter == null ? void 0 : adapter.setStateAsync(
705
- device.productKey + "." + device.deviceKey + ".electricLevel",
706
- device.electricity,
707
- true
708
- ));
709
- }
710
- });
711
- }).catch(() => {
712
- var _a;
713
- (_a = adapter.log) == null ? void 0 : _a.error("Retrieving device failed!");
714
- return null;
715
- });
716
- }, 5e4);
717
- };
718
- const calculateEnergy = async (adapter, productKey, deviceKey, stateKey, state) => {
719
- const stateNameWh = productKey + "." + deviceKey + ".calculations." + stateKey + "EnergyTodayWh";
720
- const stateNamekWh = productKey + "." + deviceKey + ".calculations." + stateKey + "EnergyTodaykWh";
721
- const currentVal = await (adapter == null ? void 0 : adapter.getStateAsync(stateNameWh));
722
- if (currentVal && currentVal.lc && state.val != void 0 && state.val != null) {
723
- const timeFrame = state.lc - (currentVal == null ? void 0 : currentVal.lc);
724
- const newVal = Number(currentVal.val) + Number(state.val) * timeFrame / 36e5;
725
- adapter == null ? void 0 : adapter.setStateAsync(stateNameWh, newVal, true);
726
- adapter == null ? void 0 : adapter.setStateAsync(
727
- stateNamekWh,
728
- Number((newVal / 1e3).toFixed(2)),
729
- true
730
- );
731
- } else {
732
- adapter == null ? void 0 : adapter.setStateAsync(stateNameWh, 0, true);
733
- adapter == null ? void 0 : adapter.setStateAsync(stateNamekWh, 0, true);
734
- }
735
- };
736
- const resetTodaysValues = async (adapter) => {
737
- adapter.deviceList.forEach((device) => {
738
- const names = ["packInput", "outputHome", "outputPack", "solarInput"];
739
- names.forEach((name) => {
740
- const stateNameWh = device.productKey + "." + device.deviceKey + ".calculations." + name + "EnergyTodayWh";
741
- const stateNamekWh = device.productKey + "." + device.deviceKey + ".calculations." + name + "EnergyTodaykWh";
742
- adapter == null ? void 0 : adapter.setStateAsync(stateNameWh, 0, true);
743
- adapter == null ? void 0 : adapter.setStateAsync(stateNamekWh, 0, true);
744
- });
745
- });
746
- };
747
24
  const updateSolarFlowState = async (adapter, productKey, deviceKey, state, val) => {
748
25
  adapter == null ? void 0 : adapter.setStateAsync(productKey + "." + deviceKey + "." + state, val, true);
749
26
  };
750
27
  // Annotate the CommonJS export names for ESM import in node:
751
28
  0 && (module.exports = {
752
- addOrUpdatePackData,
753
- calculateEnergy,
754
- createSolarFlowStates,
755
- resetTodaysValues,
756
- startCheckStatesTimer,
757
29
  updateSolarFlowState
758
30
  });
759
31
  //# sourceMappingURL=adapterService.js.map