diff --git a/README.md b/README.md index c7f6419..f2c1dce 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,8 @@ When the adapter crashes or another Code error happens, this error message that ### __WORK IN PROGRESS__ --> -### 0.6.2 (2021-09-08) - Missing axios dependency added +### 0.6.3 (2021-09-08) - HotFixes +* (DutchmanNL) Missing dropdown for ID of effects added * (DutchmanNL) HotFix: Missing axios dependency added ### 0.6.1 (2021-09-08) diff --git a/io-package.json b/io-package.json index 7b61a5a..c87b4e5 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,20 @@ { "common": { "name": "wled", - "version": "0.6.2", + "version": "0.6.3", "news": { + "0.6.3": { + "en": "Missing dropdown for ID of effects added\nHotFix: Missing axios dependency added", + "de": "Fehlende Dropdown-Liste für die ID der hinzugefügten Effekte\nHotFix: Fehlende Axios-Abhängigkeit hinzugefügt", + "ru": "Отсутствует раскрывающийся список для идентификатора добавленных эффектов.\nHotFix: добавлена отсутствующая зависимость axios", + "pt": "Lista suspensa ausente para ID de efeitos adicionados\nHotFix: Dependência de axios ausente adicionada", + "nl": "Ontbrekende vervolgkeuzelijst voor ID van toegevoegde effecten\nHotFix: ontbrekende axios-afhankelijkheid toegevoegd", + "fr": "Liste déroulante manquante pour l'ID des effets ajoutés\nHotFix : Ajout d'une dépendance axios manquante", + "it": "Menu a discesa mancante per l'ID degli effetti aggiunti\nHotFix: aggiunta dipendenza Axios mancante", + "es": "Falta el menú desplegable para la identificación de los efectos agregados\nHotFix: Se agregó la dependencia de axios faltante", + "pl": "Brakujące menu dla identyfikatora dodanych efektów\nPoprawka: dodano brakującą zależność axios", + "zh-cn": "缺少添加效果 ID 的下拉菜单\nHotFix:添加了缺少 axios 依赖项" + }, "0.6.2": { "en": "HotFix: Missing axios dependency added", "de": "HotFix: Fehlende Axios-Abhängigkeit hinzugefügt", diff --git a/main.js b/main.js index 369e600..7fb12b5 100644 --- a/main.js +++ b/main.js @@ -463,13 +463,15 @@ class Wled extends utils.Adapter { await this.create_state(device_id + '._info' + '._online', 'online', true); // Store / Update effects - const effects = deviceData.effects; - if (this.IsJsonString(effects)) { // arteck + try { + const effects = deviceData.effects; // Store effects array this.effects[device_id] = {}; for (const i in effects) { this.effects[device_id][i] = effects[i]; } + } catch (e){ + this.log.debug(`Cannot create effect dropdown`) } // Store / Update pallets @@ -1082,20 +1084,7 @@ class Wled extends utils.Adapter { this.log.error(`Sentry disabled, error caught : ${sentryMessage}`); } } - - /** - * Verify if string id JSON - * @param {string} str string to check - */ - IsJsonString(str) { - try { - JSON.parse(str); - } catch (e) { - return false; - } - return true; - } - + /** * Ensure proper deletion of state and object * @param {string} state ID of object to delete diff --git a/package-lock.json b/package-lock.json index e3025eb..25faccb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "iobroker.wled", - "version": "0.6.2", + "version": "0.6.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 71361c7..921befd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iobroker.wled", - "version": "0.6.2", + "version": "0.6.3", "description": "A fast and feature-rich implementation of an ESP8266/ESP32 webserver to control NeoPixel (WS2812B, WS2811, SK6812, APA102) LEDs!", "author": { "name": "DutchmanNL",