iobroker.lorawan 1.19.3 → 1.19.5
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 +6 -0
- package/io-package.json +27 -27
- package/lib/modules/bridgeDeviceHandler.js +11 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,6 +23,12 @@ 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.5 (2026-01-04)
|
|
27
|
+
* (BenAhrdt) change nameing and handling of device_class (result for roles)
|
|
28
|
+
|
|
29
|
+
### 1.19.4 (2026-01-04)
|
|
30
|
+
* (BenAhrdt) change buildSafeStateId (domain)
|
|
31
|
+
|
|
26
32
|
### 1.19.3 (2026-01-04)
|
|
27
33
|
* (BenAhrdt) add version and domain to automation
|
|
28
34
|
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "lorawan",
|
|
4
|
-
"version": "1.19.
|
|
4
|
+
"version": "1.19.5",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.19.5": {
|
|
7
|
+
"en": "change nameing and handling of device_class (result for roles)",
|
|
8
|
+
"de": "nameing und handling von device_class ändern (ergebnis für rollen)",
|
|
9
|
+
"ru": "изменение наименования и обработки device_class (результат для ролей)",
|
|
10
|
+
"pt": "mudar nome e manipulação de device_class (resultado para funções)",
|
|
11
|
+
"nl": "naam wijzigen en hanteren van device_class (resultaat voor rollen)",
|
|
12
|
+
"fr": "modifier le nom et la gestion de la classe de périphérique (résultats pour les rôles)",
|
|
13
|
+
"it": "cambiamento nome e gestione di device_class (risultato per ruoli)",
|
|
14
|
+
"es": "cambio de nombre y manejo de dispositivo_class (resultado para roles)",
|
|
15
|
+
"pl": "zmiana nazwy i obsługi urządzenia _ class (wynik dla ról)",
|
|
16
|
+
"uk": "зміна назв і обробки пристрою_class (здійснення ролі)",
|
|
17
|
+
"zh-cn": "更改设备名称和处理级别( 角色结果)"
|
|
18
|
+
},
|
|
19
|
+
"1.19.4": {
|
|
20
|
+
"en": "change buildSafeStateId (domain)",
|
|
21
|
+
"de": "änderungen Sicherheit Id (domain)",
|
|
22
|
+
"ru": "изменение структуры Безопасное государство Id (домен)",
|
|
23
|
+
"pt": "alterar compilação Estado Seguro ID (domínio)",
|
|
24
|
+
"nl": "bouwen veranderen Veilige staat Id (domein)",
|
|
25
|
+
"fr": "construction de changement État de sécurité Id (domaine)",
|
|
26
|
+
"it": "cambiamento di costruzione Stato sicuro Id (domain)",
|
|
27
|
+
"es": "cambio de construcción Estado seguro Id (dominio)",
|
|
28
|
+
"pl": "zmień budowę SafeState Id (domena)",
|
|
29
|
+
"uk": "збір змін Сейфи Id (домен)",
|
|
30
|
+
"zh-cn": "变化构建 安全状态 ID( 域数)"
|
|
31
|
+
},
|
|
6
32
|
"1.19.3": {
|
|
7
33
|
"en": "add version and domain to automation",
|
|
8
34
|
"de": "version und domäne zur automatisierung hinzufügen",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "powrót czekać rozmowy w czeku Wszystkie (most)",
|
|
68
94
|
"uk": "поверніть на чек дзвінків Всі (місто)",
|
|
69
95
|
"zh-cn": "返回等待呼叫检查 全部(桥梁)"
|
|
70
|
-
},
|
|
71
|
-
"1.18.62": {
|
|
72
|
-
"en": "Promise the foreign functions in Promise.all",
|
|
73
|
-
"de": "Versprechen Sie die ausländischen Funktionen in Promise.all",
|
|
74
|
-
"ru": "Обещайте иностранные функции в Promise.all",
|
|
75
|
-
"pt": "Prometa as funções estrangeiras em Promise.all",
|
|
76
|
-
"nl": "Beloof de buitenlandse functies in Promise.all",
|
|
77
|
-
"fr": "Promets les fonctions étrangères dans Promise.all",
|
|
78
|
-
"it": "Promettere le funzioni straniere in Promise.all",
|
|
79
|
-
"es": "Prométeme las funciones extranjeras en Promesa.todos",
|
|
80
|
-
"pl": "Obiecaj funkcje zagraniczne w Promise.all",
|
|
81
|
-
"uk": "Використовуйте іноземні функції в Promise.all",
|
|
82
|
-
"zh-cn": "在保证中保证外国职能"
|
|
83
|
-
},
|
|
84
|
-
"1.18.61": {
|
|
85
|
-
"en": "set chunksize to 32",
|
|
86
|
-
"de": "set chunksize auf 32",
|
|
87
|
-
"ru": "устанавливает размер до 32",
|
|
88
|
-
"pt": "definir o tamanho do bloco como 32",
|
|
89
|
-
"nl": "blokgrootte instellen op 32",
|
|
90
|
-
"fr": "définir la taille des morceaux à 32",
|
|
91
|
-
"it": "set chunksize a 32",
|
|
92
|
-
"es": "set chunksize a 32",
|
|
93
|
-
"pl": "ustawiony rozmiar chunksize do 32",
|
|
94
|
-
"uk": "встановити chunksize до 32",
|
|
95
|
-
"zh-cn": "设置为32块"
|
|
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.
|
|
38
|
+
const version = '1.0.1';
|
|
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;
|
|
@@ -180,10 +180,13 @@ class bridgeDeviceHandlerClass {
|
|
|
180
180
|
id: `${device.id}.${entity.domain}`,
|
|
181
181
|
name: entity.domain,
|
|
182
182
|
};
|
|
183
|
-
|
|
183
|
+
let clearStatename = entity.friendly_name;
|
|
184
|
+
if (clearStatename.startsWith(`${device.name} `)) {
|
|
185
|
+
clearStatename = clearStatename.substring(device.name.length + 1, clearStatename.length);
|
|
186
|
+
}
|
|
184
187
|
const state = {
|
|
185
188
|
id: `${channel.id}.${stateId}`,
|
|
186
|
-
name:
|
|
189
|
+
name: clearStatename || stateId,
|
|
187
190
|
type: type,
|
|
188
191
|
role: this.detectRole(entity, type),
|
|
189
192
|
unit: entity.unit_of_measurement || undefined,
|
|
@@ -289,9 +292,6 @@ class bridgeDeviceHandlerClass {
|
|
|
289
292
|
if (entity.domain === 'light') {
|
|
290
293
|
return 'light';
|
|
291
294
|
}
|
|
292
|
-
if (entity.domain === 'binary_sensor') {
|
|
293
|
-
return 'indicator';
|
|
294
|
-
}
|
|
295
295
|
|
|
296
296
|
if (entity.device_class) {
|
|
297
297
|
const map = {
|
|
@@ -301,6 +301,10 @@ class bridgeDeviceHandlerClass {
|
|
|
301
301
|
energy: 'value.energy',
|
|
302
302
|
window: 'sensor.window',
|
|
303
303
|
door: 'sensor.door',
|
|
304
|
+
battery: 'value.battery',
|
|
305
|
+
voltage: 'value.voltage',
|
|
306
|
+
illuminance: 'value.brightness',
|
|
307
|
+
occupancy: 'sensor.motion',
|
|
304
308
|
};
|
|
305
309
|
if (map[entity.device_class]) {
|
|
306
310
|
return map[entity.device_class];
|
|
@@ -335,8 +339,7 @@ class bridgeDeviceHandlerClass {
|
|
|
335
339
|
|
|
336
340
|
// if eg. switch in front => remove
|
|
337
341
|
const parts = baseId.split('.');
|
|
338
|
-
const raw =
|
|
339
|
-
parts.length > 1 && parts[0] === entity.entity_id?.split('.')[0] ? parts.slice(1).join('.') : baseId;
|
|
342
|
+
const raw = parts.length > 1 && parts[0] === entity.domain ? parts.slice(1).join('.') : baseId;
|
|
340
343
|
|
|
341
344
|
// 3. remove ".
|
|
342
345
|
return raw.replace(/\./g, '_');
|