iobroker.lorawan 1.19.5 → 1.19.6

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
@@ -23,6 +23,9 @@ For now there is documentation in English here: https://wiki.hafenmeister.de
23
23
  Placeholder for the next version (at the beginning of the line):
24
24
  ### **WORK IN PROGRESS**
25
25
  -->
26
+ ### 1.19.6 (2026-01-04)
27
+ * (BenAhrdt) add available bit
28
+
26
29
  ### 1.19.5 (2026-01-04)
27
30
  * (BenAhrdt) change nameing and handling of device_class (result for roles)
28
31
 
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.19.5",
4
+ "version": "1.19.6",
5
5
  "news": {
6
+ "1.19.6": {
7
+ "en": "add available bit",
8
+ "de": "hinzufügen von bit",
9
+ "ru": "добавить доступный бит",
10
+ "pt": "adicionar bit disponível",
11
+ "nl": "beschikbare bit toevoegen",
12
+ "fr": "ajouter le bit disponible",
13
+ "it": "aggiungere bit disponibile",
14
+ "es": "añadir bit disponible",
15
+ "pl": "dodaj dostępny bit",
16
+ "uk": "додати доступний біт",
17
+ "zh-cn": "添加可用位"
18
+ },
6
19
  "1.19.5": {
7
20
  "en": "change nameing and handling of device_class (result for roles)",
8
21
  "de": "nameing und handling von device_class ändern (ergebnis für rollen)",
@@ -80,19 +93,6 @@
80
93
  "pl": "usuń Bridgetype Smarthome\ndodać firt możliwość generowania urządzeń z Bridge do Iob",
81
94
  "uk": "видалити Bridgetype Smarthome\nдо Iob",
82
95
  "zh-cn": "删除桥型 Smarthome\n从 Bridge 添加 firt 生成设备的可能性"
83
- },
84
- "1.18.63": {
85
- "en": "return to await calls in checkAll (bridge)",
86
- "de": "zurück zu warten Anrufe im Check Alle (Brücke)",
87
- "ru": "возвращение в ожидании звонков в чек Все (мост)",
88
- "pt": "retornar para aguardar chamadas em cheque Todos (ponte)",
89
- "nl": "terug te keren naar wachten gesprekken in check Alle (brug)",
90
- "fr": "retour à attendre les appels en contrôle Tous (pont)",
91
- "it": "ritorno in attesa chiamate in controllo Tutti (ponte)",
92
- "es": "volver a esperar llamadas en cheque Todo (puente)",
93
- "pl": "powrót czekać rozmowy w czeku Wszystkie (most)",
94
- "uk": "поверніть на чек дзвінків Всі (місто)",
95
- "zh-cn": "返回等待呼叫检查 全部(桥梁)"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -35,7 +35,7 @@ class bridgeDeviceHandlerClass {
35
35
  const activeFunction = 'bridgeDeviceHandler.js - generateDeviceStructure';
36
36
  this.adapter.log.silly(`Function ${activeFunction} started.`);
37
37
  try {
38
- const version = '1.0.1';
38
+ const version = '1.0.2';
39
39
  if (!message.version || message.version !== version) {
40
40
  this.adapter.log.warn(`You need to use version ${version} of the Home Assistant automation.`);
41
41
  return;
@@ -44,11 +44,26 @@ class bridgeDeviceHandlerClass {
44
44
  if (message.entities) {
45
45
  for (const entity of Object.values(message.entities)) {
46
46
  const entityInfo = this.generateStructure(entity);
47
+ const availableId = `${entityInfo?.device.id}.available`;
47
48
  await this.adapter.extendObject(entityInfo?.device.id, {
48
49
  type: 'device',
49
- common: { name: entity.device.name },
50
+ common: { name: entity.device.name, statusStates: { onlineId: availableId } },
50
51
  native: entity.device,
51
52
  });
53
+ await this.adapter.extendObject(availableId, {
54
+ type: 'state',
55
+ common: {
56
+ name: 'Device available',
57
+ type: 'boolean',
58
+ role: 'indicator.reachable',
59
+ read: true,
60
+ write: false,
61
+ def: true,
62
+ },
63
+ native: {},
64
+ });
65
+ const available = entity.available || entity.domain !== 'buton';
66
+ await this.adapter.setState(availableId, available, true);
52
67
  const channel = entity.entity_id.substring(0, entity.entity_id.indexOf('.'));
53
68
  await this.adapter.extendObject(entityInfo?.channel.id, {
54
69
  type: 'channel',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.19.5",
3
+ "version": "1.19.6",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",