iobroker.lorawan 1.19.4 → 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 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.5 (2026-01-04)
27
+ * (BenAhrdt) change nameing and handling of device_class (result for roles)
28
+
26
29
  ### 1.19.4 (2026-01-04)
27
30
  * (BenAhrdt) change buildSafeStateId (domain)
28
31
 
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.19.4",
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
+ },
6
19
  "1.19.4": {
7
20
  "en": "change buildSafeStateId (domain)",
8
21
  "de": "änderungen Sicherheit Id (domain)",
@@ -80,19 +93,6 @@
80
93
  "pl": "powrót czekać rozmowy w czeku Wszystkie (most)",
81
94
  "uk": "поверніть на чек дзвінків Всі (місто)",
82
95
  "zh-cn": "返回等待呼叫检查 全部(桥梁)"
83
- },
84
- "1.18.62": {
85
- "en": "Promise the foreign functions in Promise.all",
86
- "de": "Versprechen Sie die ausländischen Funktionen in Promise.all",
87
- "ru": "Обещайте иностранные функции в Promise.all",
88
- "pt": "Prometa as funções estrangeiras em Promise.all",
89
- "nl": "Beloof de buitenlandse functies in Promise.all",
90
- "fr": "Promets les fonctions étrangères dans Promise.all",
91
- "it": "Promettere le funzioni straniere in Promise.all",
92
- "es": "Prométeme las funciones extranjeras en Promesa.todos",
93
- "pl": "Obiecaj funkcje zagraniczne w Promise.all",
94
- "uk": "Використовуйте іноземні функції в Promise.all",
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.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: entity.friendly_name || stateId,
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];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.19.4",
3
+ "version": "1.19.5",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",