iobroker.lorawan 1.22.9 → 1.22.10

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
@@ -24,6 +24,9 @@ For now there is documentation in English here: https://wiki.hafenmeister.de
24
24
  Placeholder for the next version (at the beginning of the line):
25
25
  ### **WORK IN PROGRESS**
26
26
  -->
27
+ ### 1.22.10 (2026-04-20)
28
+ * (BenAhrdt) implements button in card
29
+
27
30
  ### 1.22.9 (2026-04-20)
28
31
  * (BenAhrdt) error resolve git push
29
32
 
@@ -162,6 +162,7 @@
162
162
  "NumberStateText": "Statusnummern-ID",
163
163
  "NumberText": "Nummern-ID",
164
164
  "OneNumber": "eine Nummer für den Befehl",
165
+ "OneNumberState": "eine Nummer für den Status",
165
166
  "OneString": "ein String für die Befehle",
166
167
  "OpenSignalId": "ID für offenen Endschalter",
167
168
  "OpenSignalText": "ID für offenen Endschalter",
@@ -237,6 +237,7 @@
237
237
  "SeparateIds": "separated ids for command",
238
238
  "OneString": "one string for command",
239
239
  "OneNumber": "one number for command",
240
+ "OneNumberState": "one number for state",
240
241
  "no command": "no command id",
241
242
  "CoverPosition": "position",
242
243
  "CoverPositionTooltip": "selected: separate id for position",
@@ -162,6 +162,7 @@
162
162
  "NumberStateText": "Identificación del número de estado",
163
163
  "NumberText": "Número de identificación",
164
164
  "OneNumber": "un número para comando",
165
+ "OneNumberState": "un número para el estado",
165
166
  "OneString": "una cadena para el comando",
166
167
  "OpenSignalId": "ID para interruptor de límite abierto",
167
168
  "OpenSignalText": "ID para interruptor de límite abierto",
@@ -162,6 +162,7 @@
162
162
  "NumberStateText": "Identifiant du numéro d'état",
163
163
  "NumberText": "Numéro d'identification",
164
164
  "OneNumber": "un numéro pour la commande",
165
+ "OneNumberState": "un numéro pour l'état",
165
166
  "OneString": "une chaîne pour la commande",
166
167
  "OpenSignalId": "identifiant pour fin de course ouvert",
167
168
  "OpenSignalText": "identifiant pour fin de course ouvert",
@@ -162,6 +162,7 @@
162
162
  "NumberStateText": "ID numero stato",
163
163
  "NumberText": "Numero identificativo",
164
164
  "OneNumber": "un numero per comando",
165
+ "OneNumberState": "un numero per stato",
165
166
  "OneString": "una stringa per il comando",
166
167
  "OpenSignalId": "id per finecorsa aperto",
167
168
  "OpenSignalText": "id per finecorsa aperto",
@@ -162,6 +162,7 @@
162
162
  "NumberStateText": "Staatsnummer-ID",
163
163
  "NumberText": "Nummer-ID",
164
164
  "OneNumber": "één nummer voor commando",
165
+ "OneNumberState": "één nummer voor staat",
165
166
  "OneString": "één string voor commando",
166
167
  "OpenSignalId": "ID voor open eindschakelaar",
167
168
  "OpenSignalText": "ID voor open eindschakelaar",
@@ -162,6 +162,7 @@
162
162
  "NumberStateText": "Identyfikator numeru stanu",
163
163
  "NumberText": "Numer identyfikacyjny",
164
164
  "OneNumber": "jeden numer do polecenia",
165
+ "OneNumberState": "jedna liczba dla stanu",
165
166
  "OneString": "jeden ciąg dla polecenia",
166
167
  "OpenSignalId": "identyfikator otwartego wyłącznika krańcowego",
167
168
  "OpenSignalText": "identyfikator otwartego wyłącznika krańcowego",
@@ -162,6 +162,7 @@
162
162
  "NumberStateText": "ID do número do estado",
163
163
  "NumberText": "ID do número",
164
164
  "OneNumber": "um número para comando",
165
+ "OneNumberState": "um número para estado",
165
166
  "OneString": "uma string para comando",
166
167
  "OpenSignalId": "id para interruptor de limite aberto",
167
168
  "OpenSignalText": "id para interruptor de limite aberto",
@@ -162,6 +162,7 @@
162
162
  "NumberStateText": "Идентификатор номера штата",
163
163
  "NumberText": "Идентификатор номера",
164
164
  "OneNumber": "один номер для команды",
165
+ "OneNumberState": "один номер для штата",
165
166
  "OneString": "одна строка для команды",
166
167
  "OpenSignalId": "идентификатор концевого выключателя открытия",
167
168
  "OpenSignalText": "идентификатор концевого выключателя открытия",
@@ -162,6 +162,7 @@
162
162
  "NumberStateText": "Ідентифікатор державного номера",
163
163
  "NumberText": "ID номера",
164
164
  "OneNumber": "одна цифра для команди",
165
+ "OneNumberState": "один номер для держ",
165
166
  "OneString": "один рядок для команди",
166
167
  "OpenSignalId": "ідентифікатор для відкритого кінцевого вимикача",
167
168
  "OpenSignalText": "ідентифікатор для відкритого кінцевого вимикача",
@@ -162,6 +162,7 @@
162
162
  "NumberStateText": "州号 ID",
163
163
  "NumberText": "号码 ID",
164
164
  "OneNumber": "一个数字用于命令",
165
+ "OneNumberState": "一个数字代表州",
165
166
  "OneString": "一个命令字符串",
166
167
  "OpenSignalId": "打开限位开关的 id",
167
168
  "OpenSignalText": "打开限位开关的 id",
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.22.9",
4
+ "version": "1.22.10",
5
5
  "news": {
6
+ "1.22.10": {
7
+ "en": "implements button in card",
8
+ "de": "implementiert knopf in der karte",
9
+ "ru": "реализует кнопку в карточке",
10
+ "pt": "implementa o botão no cartão",
11
+ "nl": "implementeert knop in kaart",
12
+ "fr": "implémente bouton dans la carte",
13
+ "it": "implementa il pulsante nella scheda",
14
+ "es": "implementa el botón en la tarjeta",
15
+ "pl": "implementuje przycisk w karcie",
16
+ "uk": "реалізується кнопка в картці",
17
+ "zh-cn": "执行卡中的按钮"
18
+ },
6
19
  "1.22.9": {
7
20
  "en": "error resolve git push",
8
21
  "de": "fehler beheben git push",
@@ -80,19 +93,6 @@
80
93
  "pl": "dodaj pierwszy test dla stanu podłączonych urządzeń pokazany w kartach menedżera urządzeń",
81
94
  "uk": "додати перший тест для станів настрочених пристроїв, відображених в картах диспетчера пристроїв",
82
95
  "zh-cn": "添加第一个设备管理卡中显示的配置设备状态测试"
83
- },
84
- "1.22.2": {
85
- "en": "remove readOnly flag from jsonEditor",
86
- "de": "readOnly flag von jsonEditor entfernen",
87
- "ru": "удалить только флаг jsonEditor",
88
- "pt": "remove readOnly flag do jsonEditor",
89
- "nl": "readOnly-vlag verwijderen uit jsonEditor",
90
- "fr": "supprimer readOnly drapeau de jsonEditor",
91
- "it": "rimuovere readOnly flag da jsonEditor",
92
- "es": "eliminar readOnly flag de jsonEditor",
93
- "pl": "usuń flagę readOnly z jsonEditor",
94
- "uk": "remove readOnly прапорець з jsonEditor",
95
- "zh-cn": "从json编辑器中删除只读的旗"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -71,7 +71,7 @@ class bridgeDevicesClass {
71
71
  let card = {};
72
72
  if (discovery.ids.target) {
73
73
  this.adapter.log[this.adapter.logtypes.listDevices]?.(
74
- `Start building Light On for Id: ${discovery.ids.target}`,
74
+ `Start building target for Id: ${discovery.ids.target}`,
75
75
  );
76
76
  usedId[discovery.ids.target] = true;
77
77
  card = { preLabel: '🌡 ', label: 'Solltemperatur' };
@@ -100,7 +100,7 @@ class bridgeDevicesClass {
100
100
  }
101
101
  if (discovery.ids.act) {
102
102
  this.adapter.log[this.adapter.logtypes.listDevices]?.(
103
- `Start building Light Brightness for Id: ${discovery.ids.act}`,
103
+ `Start building act for Id: ${discovery.ids.act}`,
104
104
  );
105
105
  usedId[discovery.ids.act] = true;
106
106
  card = { preLabel: '🌡 ', label: 'Isttemperatur' };
@@ -140,7 +140,7 @@ class bridgeDevicesClass {
140
140
  let card = {};
141
141
  if (discovery.ids.onOff) {
142
142
  this.adapter.log[this.adapter.logtypes.listDevices]?.(
143
- `Start building Light On for Id: ${discovery.ids.onOff}`,
143
+ `Start building On for Id: ${discovery.ids.onOff}`,
144
144
  );
145
145
  usedId[discovery.ids.onOff] = true;
146
146
  card = { preLabel: '⏻ ', label: 'Aus / An' };
@@ -173,7 +173,7 @@ class bridgeDevicesClass {
173
173
  }
174
174
  if (discovery.ids.target) {
175
175
  this.adapter.log[this.adapter.logtypes.listDevices]?.(
176
- `Start building Light Brightness for Id: ${discovery.ids.target}`,
176
+ `Start building target for Id: ${discovery.ids.target}`,
177
177
  );
178
178
  usedId[discovery.ids.target] = true;
179
179
  card = { preLabel: '💧 ', label: 'Sollfeuchtigkeit' };
@@ -202,7 +202,7 @@ class bridgeDevicesClass {
202
202
  }
203
203
  if (discovery.ids.act) {
204
204
  this.adapter.log[this.adapter.logtypes.listDevices]?.(
205
- `Start building Light Brightness for Id: ${discovery.ids.act}`,
205
+ `Start building act for Id: ${discovery.ids.act}`,
206
206
  );
207
207
  usedId[discovery.ids.act] = true;
208
208
  card = { preLabel: '💧 ', label: 'Istfeuchtigkeit' };
@@ -242,7 +242,7 @@ class bridgeDevicesClass {
242
242
  let card = {};
243
243
  if (discovery.ids.open) {
244
244
  this.adapter.log[this.adapter.logtypes.listDevices]?.(
245
- `Start building Light On for Id: ${discovery.ids.open}`,
245
+ `Start building open for Id: ${discovery.ids.open}`,
246
246
  );
247
247
  usedId[discovery.ids.open] = true;
248
248
  card = { preLabel: '', label: 'Öffnen' };
@@ -271,7 +271,7 @@ class bridgeDevicesClass {
271
271
  }
272
272
  if (discovery.ids.close) {
273
273
  this.adapter.log[this.adapter.logtypes.listDevices]?.(
274
- `Start building Light On for Id: ${discovery.ids.close}`,
274
+ `Start building close for Id: ${discovery.ids.close}`,
275
275
  );
276
276
  usedId[discovery.ids.close] = true;
277
277
  card = { preLabel: '', label: 'Schließen' };
@@ -300,7 +300,7 @@ class bridgeDevicesClass {
300
300
  }
301
301
  if (discovery.ids.stop) {
302
302
  this.adapter.log[this.adapter.logtypes.listDevices]?.(
303
- `Start building Light On for Id: ${discovery.ids.stop}`,
303
+ `Start building stop for Id: ${discovery.ids.stop}`,
304
304
  );
305
305
  usedId[discovery.ids.stop] = true;
306
306
  card = { preLabel: '', label: 'Stop' };
@@ -329,7 +329,7 @@ class bridgeDevicesClass {
329
329
  }
330
330
  if (discovery.ids.openSignal) {
331
331
  this.adapter.log[this.adapter.logtypes.listDevices]?.(
332
- `Start building Light On for Id: ${discovery.ids.openSignal}`,
332
+ `Start building open Signal for Id: ${discovery.ids.openSignal}`,
333
333
  );
334
334
  usedId[discovery.ids.openSignal] = true;
335
335
  card = { preLabel: '', label: 'Oben (offen)' };
@@ -360,7 +360,7 @@ class bridgeDevicesClass {
360
360
  }
361
361
  if (discovery.ids.closedSignal) {
362
362
  this.adapter.log[this.adapter.logtypes.listDevices]?.(
363
- `Start building Light On for Id: ${discovery.ids.closedSignal}`,
363
+ `Start building closed Signal for Id: ${discovery.ids.closedSignal}`,
364
364
  );
365
365
  usedId[discovery.ids.closedSignal] = true;
366
366
  card = { preLabel: '', label: 'Unten (zu)' };
@@ -402,7 +402,7 @@ class bridgeDevicesClass {
402
402
  let card = {};
403
403
  if (discovery.ids.lock) {
404
404
  this.adapter.log[this.adapter.logtypes.listDevices]?.(
405
- `Start building Light On for Id: ${discovery.ids.lock}`,
405
+ `Start building lock for Id: ${discovery.ids.lock}`,
406
406
  );
407
407
  usedId[discovery.ids.lock] = true;
408
408
  card = { preLabel: '🔒 ', label: 'Abschließen' };
@@ -431,7 +431,7 @@ class bridgeDevicesClass {
431
431
  }
432
432
  if (discovery.ids.unlock) {
433
433
  this.adapter.log[this.adapter.logtypes.listDevices]?.(
434
- `Start building Light On for Id: ${discovery.ids.unlock}`,
434
+ `Start building unlock for Id: ${discovery.ids.unlock}`,
435
435
  );
436
436
  usedId[discovery.ids.unlock] = true;
437
437
  card = { preLabel: '🔓 ', label: 'Aufschließen' };
@@ -460,7 +460,7 @@ class bridgeDevicesClass {
460
460
  }
461
461
  if (discovery.ids.open) {
462
462
  this.adapter.log[this.adapter.logtypes.listDevices]?.(
463
- `Start building Light On for Id: ${discovery.ids.open}`,
463
+ `Start building open for Id: ${discovery.ids.open}`,
464
464
  );
465
465
  usedId[discovery.ids.open] = true;
466
466
  card = { preLabel: '', label: 'Öffnen' };
@@ -489,7 +489,7 @@ class bridgeDevicesClass {
489
489
  }
490
490
  if (discovery.ids.state) {
491
491
  this.adapter.log[this.adapter.logtypes.listDevices]?.(
492
- `Start building Light On for Id: ${discovery.ids.state}`,
492
+ `Start building state for Id: ${discovery.ids.state}`,
493
493
  );
494
494
  usedId[discovery.ids.state] = true;
495
495
  card = { preLabel: '', label: 'Status' };
@@ -523,6 +523,315 @@ class bridgeDevicesClass {
523
523
  //////////////////////////////////////////////////////////////////////////////////////////////////
524
524
  //////////////////////////////////////////////////////////////////////////////////////////////////
525
525
  //////////////////////////////////////////////////////////////////////////////////////////////////
526
+ if (deviceValue.entityType.lawn_mower) {
527
+ for (const discovery of deviceValue.discovery) {
528
+ if (discovery.topic.startsWith('homeassistant/lawn_mower/')) {
529
+ let card = {};
530
+ if (discovery.ids.CommandId) {
531
+ this.adapter.log[this.adapter.logtypes.listDevices]?.(
532
+ `Start building LawnMower command for Id: ${discovery.ids.CommandId}`,
533
+ );
534
+ usedId[discovery.ids.CommandId] = true;
535
+ // Start
536
+ card = { label: 'Start' };
537
+ card = lodash.merge(card, deviceValue.ids[discovery.ids.CommandId].object.native?.card);
538
+ let preLabel = card.preLabel ?? '';
539
+ let label = '';
540
+ if (card.name) {
541
+ label = card.name;
542
+ } else if (card.label) {
543
+ label = card.label;
544
+ } else {
545
+ label = deviceValue.ids[discovery.ids.CommandId].object._id.substring(
546
+ deviceValue.ids[discovery.ids.CommandId].object._id.lastIndexOf('.') + 1,
547
+ );
548
+ }
549
+ let desiredTopic = discovery.payload.start_mowing_command_topic;
550
+ let buttonValue = deviceValue.SubscribedTopics[desiredTopic].messageAssign.start_mowing.val;
551
+ res.customInfo.schema.items[`${discovery.ids.CommandId}_CommandId_Start`] = {
552
+ type: 'state',
553
+ // The full state ID including namespace (foreign = true means it's an absolute ID).
554
+ oid: discovery.ids.CommandId,
555
+ foreign: true,
556
+ // Render as an interactive switch control.
557
+ control: 'button',
558
+ // Style the text based on the boolean value.
559
+ label: preLabel + label,
560
+ buttonValue: buttonValue,
561
+ };
562
+
563
+ // Stop
564
+ card = { label: 'Stop' };
565
+ card = lodash.merge(card, deviceValue.ids[discovery.ids.CommandId].object.native?.card);
566
+ preLabel = card.preLabel ?? '';
567
+ label = '';
568
+ if (card.name) {
569
+ label = card.name;
570
+ } else if (card.label) {
571
+ label = card.label;
572
+ } else {
573
+ label = deviceValue.ids[discovery.ids.CommandId].object._id.substring(
574
+ deviceValue.ids[discovery.ids.CommandId].object._id.lastIndexOf('.') + 1,
575
+ );
576
+ }
577
+ desiredTopic = discovery.payload.pause_command_topic;
578
+ buttonValue = deviceValue.SubscribedTopics[desiredTopic].messageAssign.pause.val;
579
+ res.customInfo.schema.items[`${discovery.ids.CommandId}_CommandId_Stop`] = {
580
+ type: 'state',
581
+ // The full state ID including namespace (foreign = true means it's an absolute ID).
582
+ oid: discovery.ids.CommandId,
583
+ foreign: true,
584
+ // Render as an interactive switch control.
585
+ control: 'button',
586
+ // Style the text based on the boolean value.
587
+ label: preLabel + label,
588
+ buttonValue: buttonValue,
589
+ };
590
+
591
+ // Home
592
+ card = { label: 'Home' };
593
+ card = lodash.merge(card, deviceValue.ids[discovery.ids.CommandId].object.native?.card);
594
+ preLabel = card.preLabel ?? '';
595
+ label = '';
596
+ if (card.name) {
597
+ label = card.name;
598
+ } else if (card.label) {
599
+ label = card.label;
600
+ } else {
601
+ label = deviceValue.ids[discovery.ids.CommandId].object._id.substring(
602
+ deviceValue.ids[discovery.ids.CommandId].object._id.lastIndexOf('.') + 1,
603
+ );
604
+ }
605
+ desiredTopic = discovery.payload.dock_command_topic;
606
+ buttonValue = deviceValue.SubscribedTopics[desiredTopic].messageAssign.dock.val;
607
+ res.customInfo.schema.items[`${discovery.ids.CommandId}_CommandId_Home`] = {
608
+ type: 'state',
609
+ // The full state ID including namespace (foreign = true means it's an absolute ID).
610
+ oid: discovery.ids.CommandId,
611
+ foreign: true,
612
+ // Render as an interactive switch control.
613
+ control: 'button',
614
+ // Style the text based on the boolean value.
615
+ label: preLabel + label,
616
+ buttonValue: buttonValue,
617
+ };
618
+ }
619
+ if (discovery.ids.StartId) {
620
+ this.adapter.log[this.adapter.logtypes.listDevices]?.(
621
+ `Start building LawnMower start for Id: ${discovery.ids.StartId}`,
622
+ );
623
+ usedId[discovery.ids.StartId] = true;
624
+ // Start
625
+ card = { label: 'Start' };
626
+ card = lodash.merge(card, deviceValue.ids[discovery.ids.StartId].object.native?.card);
627
+ let preLabel = card.preLabel ?? '';
628
+ let label = '';
629
+ if (card.name) {
630
+ label = card.name;
631
+ } else if (card.label) {
632
+ label = card.label;
633
+ } else {
634
+ label = deviceValue.ids[discovery.ids.StartId].object._id.substring(
635
+ deviceValue.ids[discovery.ids.StartId].object._id.lastIndexOf('.') + 1,
636
+ );
637
+ }
638
+ res.customInfo.schema.items[`${discovery.ids.StartId}_StartId`] = {
639
+ type: 'state',
640
+ // The full state ID including namespace (foreign = true means it's an absolute ID).
641
+ oid: discovery.ids.StartId,
642
+ foreign: true,
643
+ // Render as an interactive switch control.
644
+ control: 'button',
645
+ // Style the text based on the boolean value.
646
+ label: preLabel + label,
647
+ };
648
+ }
649
+ if (discovery.ids.StopId) {
650
+ this.adapter.log[this.adapter.logtypes.listDevices]?.(
651
+ `Start building LawnMower stop for Id: ${discovery.ids.StopId}`,
652
+ );
653
+ usedId[discovery.ids.StopId] = true;
654
+ // Start
655
+ card = { label: 'Stop' };
656
+ card = lodash.merge(card, deviceValue.ids[discovery.ids.StopId].object.native?.card);
657
+ let preLabel = card.preLabel ?? '';
658
+ let label = '';
659
+ if (card.name) {
660
+ label = card.name;
661
+ } else if (card.label) {
662
+ label = card.label;
663
+ } else {
664
+ label = deviceValue.ids[discovery.ids.StopId].object._id.substring(
665
+ deviceValue.ids[discovery.ids.StopId].object._id.lastIndexOf('.') + 1,
666
+ );
667
+ }
668
+ res.customInfo.schema.items[`${discovery.ids.StopId}_StopId`] = {
669
+ type: 'state',
670
+ // The full state ID including namespace (foreign = true means it's an absolute ID).
671
+ oid: discovery.ids.StopId,
672
+ foreign: true,
673
+ // Render as an interactive switch control.
674
+ control: 'button',
675
+ // Style the text based on the boolean value.
676
+ label: preLabel + label,
677
+ };
678
+ }
679
+ if (discovery.ids.HomeId) {
680
+ this.adapter.log[this.adapter.logtypes.listDevices]?.(
681
+ `Start building LawnMower Home for Id: ${discovery.ids.HomeId}`,
682
+ );
683
+ usedId[discovery.ids.HomeId] = true;
684
+ // Start
685
+ card = { label: 'Home' };
686
+ card = lodash.merge(card, deviceValue.ids[discovery.ids.HomeId].object.native?.card);
687
+ let preLabel = card.preLabel ?? '';
688
+ let label = '';
689
+ if (card.name) {
690
+ label = card.name;
691
+ } else if (card.label) {
692
+ label = card.label;
693
+ } else {
694
+ label = deviceValue.ids[discovery.ids.HomeId].object._id.substring(
695
+ deviceValue.ids[discovery.ids.HomeId].object._id.lastIndexOf('.') + 1,
696
+ );
697
+ }
698
+ res.customInfo.schema.items[`${discovery.ids.HomeId}_HomeId`] = {
699
+ type: 'state',
700
+ // The full state ID including namespace (foreign = true means it's an absolute ID).
701
+ oid: discovery.ids.HomeId,
702
+ foreign: true,
703
+ // Render as an interactive switch control.
704
+ control: 'button',
705
+ // Style the text based on the boolean value.
706
+ label: preLabel + label,
707
+ };
708
+ }
709
+ if (discovery.ids.StateId) {
710
+ this.adapter.log[this.adapter.logtypes.listDevices]?.(
711
+ `Start building LawnMower state for Id: ${discovery.ids.CommandId}`,
712
+ );
713
+ usedId[discovery.ids.StateId] = true;
714
+ card = { label: 'State' };
715
+ card = lodash.merge(card, deviceValue.ids[discovery.ids.StateId].object.native?.card);
716
+ let preLabel = card.preLabel ?? '';
717
+ let label = '';
718
+ if (card.name) {
719
+ label = card.name;
720
+ } else if (card.label) {
721
+ label = card.label;
722
+ } else {
723
+ label = deviceValue.ids[discovery.ids.StateId].object._id.substring(
724
+ deviceValue.ids[discovery.ids.StateId].object._id.lastIndexOf('.') + 1,
725
+ );
726
+ }
727
+ res.customInfo.schema.items[`${discovery.ids.StateId}_StateId`] = {
728
+ type: 'state',
729
+ // The full state ID including namespace (foreign = true means it's an absolute ID).
730
+ oid: discovery.ids.StateId,
731
+ foreign: true,
732
+ // Render as an interactive switch control.
733
+ control: 'text',
734
+ // Style the text based on the boolean value.
735
+ label: preLabel + label,
736
+ };
737
+ }
738
+ if (discovery.ids.MowingStateId) {
739
+ this.adapter.log[this.adapter.logtypes.listDevices]?.(
740
+ `Start building LawnMower start for Id: ${discovery.ids.MowingStateId}`,
741
+ );
742
+ usedId[discovery.ids.MowingStateId] = true;
743
+ // Start
744
+ card = { label: 'Start' };
745
+ card = lodash.merge(card, deviceValue.ids[discovery.ids.MowingStateId].object.native?.card);
746
+ let preLabel = card.preLabel ?? '';
747
+ let label = '';
748
+ if (card.name) {
749
+ label = card.name;
750
+ } else if (card.label) {
751
+ label = card.label;
752
+ } else {
753
+ label = deviceValue.ids[discovery.ids.MowingStateId].object._id.substring(
754
+ deviceValue.ids[discovery.ids.MowingStateId].object._id.lastIndexOf('.') + 1,
755
+ );
756
+ }
757
+ res.customInfo.schema.items[`${discovery.ids.MowingStateId}_MowingStateId`] = {
758
+ type: 'state',
759
+ // The full state ID including namespace (foreign = true means it's an absolute ID).
760
+ oid: discovery.ids.MowingStateId,
761
+ foreign: true,
762
+ // Render as an interactive switch control.
763
+ control: 'button',
764
+ // Style the text based on the boolean value.
765
+ label: preLabel + label,
766
+ };
767
+ }
768
+ if (discovery.ids.IdleStateId) {
769
+ this.adapter.log[this.adapter.logtypes.listDevices]?.(
770
+ `Start building LawnMower stop for Id: ${discovery.ids.IdleStateId}`,
771
+ );
772
+ usedId[discovery.ids.IdleStateId] = true;
773
+ // Start
774
+ card = { label: 'Stop' };
775
+ card = lodash.merge(card, deviceValue.ids[discovery.ids.IdleStateId].object.native?.card);
776
+ let preLabel = card.preLabel ?? '';
777
+ let label = '';
778
+ if (card.name) {
779
+ label = card.name;
780
+ } else if (card.label) {
781
+ label = card.label;
782
+ } else {
783
+ label = deviceValue.ids[discovery.ids.IdleStateId].object._id.substring(
784
+ deviceValue.ids[discovery.ids.IdleStateId].object._id.lastIndexOf('.') + 1,
785
+ );
786
+ }
787
+ res.customInfo.schema.items[`${discovery.ids.IdleStateId}_IdleStateId`] = {
788
+ type: 'state',
789
+ // The full state ID including namespace (foreign = true means it's an absolute ID).
790
+ oid: discovery.ids.IdleStateId,
791
+ foreign: true,
792
+ // Render as an interactive switch control.
793
+ control: 'button',
794
+ // Style the text based on the boolean value.
795
+ label: preLabel + label,
796
+ };
797
+ }
798
+ if (discovery.ids.HomeStateId) {
799
+ this.adapter.log[this.adapter.logtypes.listDevices]?.(
800
+ `Start building LawnMower Home for Id: ${discovery.ids.HomeStateId}`,
801
+ );
802
+ usedId[discovery.ids.HomeStateId] = true;
803
+ // Start
804
+ card = { label: 'Home' };
805
+ card = lodash.merge(card, deviceValue.ids[discovery.ids.HomeStateId].object.native?.card);
806
+ let preLabel = card.preLabel ?? '';
807
+ let label = '';
808
+ if (card.name) {
809
+ label = card.name;
810
+ } else if (card.label) {
811
+ label = card.label;
812
+ } else {
813
+ label = deviceValue.ids[discovery.ids.HomeStateId].object._id.substring(
814
+ deviceValue.ids[discovery.ids.HomeStateId].object._id.lastIndexOf('.') + 1,
815
+ );
816
+ }
817
+ res.customInfo.schema.items[`${discovery.ids.HomeStateId}_HomeStateId`] = {
818
+ type: 'state',
819
+ // The full state ID including namespace (foreign = true means it's an absolute ID).
820
+ oid: discovery.ids.HomeStateId,
821
+ foreign: true,
822
+ // Render as an interactive switch control.
823
+ control: 'button',
824
+ // Style the text based on the boolean value.
825
+ label: preLabel + label,
826
+ };
827
+ }
828
+ break;
829
+ }
830
+ }
831
+ }
832
+ //////////////////////////////////////////////////////////////////////////////////////////////////
833
+ //////////////////////////////////////////////////////////////////////////////////////////////////
834
+ //////////////////////////////////////////////////////////////////////////////////////////////////
526
835
  if (deviceValue.entityType.light) {
527
836
  for (const discovery of deviceValue.discovery) {
528
837
  if (discovery.topic.startsWith('homeassistant/light/')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.22.9",
3
+ "version": "1.22.10",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",