iobroker.smartcontrol 1.3.0 → 1.3.1
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 +4 -0
- package/admin/index_m.html +15 -19
- package/admin/style.css +23 -0
- package/admin/words.js +1 -0
- package/io-package.json +14 -13
- package/lib/trigger-class.js +5 -5
- package/main.js +10 -4
- package/package.json +1 -1
- package/admin/doc-md/info-text_de.md +0 -1
- package/admin/doc-md/info-text_en.md +0 -1
package/README.md
CHANGED
|
@@ -90,6 +90,10 @@ This is just to provide you an overview of the adapter options.
|
|
|
90
90
|
Placeholder for the next version (at the beginning of the line):
|
|
91
91
|
### **WORK IN PROGRESS**
|
|
92
92
|
-->
|
|
93
|
+
### 1.3.1 (2022-10-20)
|
|
94
|
+
* (simatec) (oelison) dark mode fix #5
|
|
95
|
+
* (oelison) log info type error #16
|
|
96
|
+
|
|
93
97
|
### 1.3.0 (2022-10-14)
|
|
94
98
|
* (oelison) remove errors and warnings ocured during deploy
|
|
95
99
|
* (oelison) comment for zones added
|
package/admin/index_m.html
CHANGED
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
<p class="translate" style="font-size: 1.3em;">tabMain.Doc</p>
|
|
89
89
|
</div>
|
|
90
90
|
<!-- Importing Markdown -->
|
|
91
|
-
<zero-md id="md-start" manual-render src="doc-md/start_en.md"></zero-md>
|
|
91
|
+
<zero-md id="md-start" manual-render src="doc-md/start_en.md"><template><style></style></template></zero-md>
|
|
92
92
|
<div>
|
|
93
93
|
<p style="margin-top: 25px"><span class="translate">Adapter Version</span>: <span id="adapter-version"></span></p>
|
|
94
94
|
</div>
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
</div>
|
|
116
116
|
<div class="collapsible-body">
|
|
117
117
|
<!-- Importing Markdown -->
|
|
118
|
-
<zero-md id="md-targetDevices" manual-render src="doc-md/table-target-devices_en.md"></zero-md>
|
|
118
|
+
<zero-md id="md-targetDevices" manual-render src="doc-md/table-target-devices_en.md"><template><style></style></template></zero-md>
|
|
119
119
|
</div>
|
|
120
120
|
</li>
|
|
121
121
|
</ul>
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
<div class="collapsible-header config-section"><h5 class="translate">Targets: Enum functions</h5><i class="material-icons">help_outline</i></div>
|
|
165
165
|
<div class="collapsible-body">
|
|
166
166
|
<!-- Importing Markdown -->
|
|
167
|
-
<zero-md id="md-tableTargetEnums" manual-render src="doc-md/table-target-enums_en.md"></zero-md>
|
|
167
|
+
<zero-md id="md-tableTargetEnums" manual-render src="doc-md/table-target-enums_en.md"><template><style></style></template></zero-md>
|
|
168
168
|
</div>
|
|
169
169
|
</li>
|
|
170
170
|
</ul>
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
<div class="collapsible-header config-section"><h5 class="translate">Targets: URLs</h5><i class="material-icons">help_outline</i></div>
|
|
210
210
|
<div class="collapsible-body">
|
|
211
211
|
<!-- Importing Markdown -->
|
|
212
|
-
<zero-md id="md-tableTargetURLs" manual-render src="doc-md/table-target-url_en.md"></zero-md>
|
|
212
|
+
<zero-md id="md-tableTargetURLs" manual-render src="doc-md/table-target-url_en.md"><template><style></style></template></zero-md>
|
|
213
213
|
</div>
|
|
214
214
|
</li>
|
|
215
215
|
</ul>
|
|
@@ -256,7 +256,7 @@
|
|
|
256
256
|
<div class="collapsible-header config-section"><h5 class="translate">Additional conditions</h5><i class="material-icons">help_outline</i></div>
|
|
257
257
|
<div class="collapsible-body">
|
|
258
258
|
<!-- Importing Markdown -->
|
|
259
|
-
<zero-md id="md-tableConditions" manual-render src="doc-md/table-conditions_en.md"></zero-md>
|
|
259
|
+
<zero-md id="md-tableConditions" manual-render src="doc-md/table-conditions_en.md"><template><style></style></template></zero-md>
|
|
260
260
|
</div>
|
|
261
261
|
</li>
|
|
262
262
|
</ul>
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
<div class="collapsible-header config-section"><h5 class="translate">Motion sensors</h5><i class="material-icons">help_outline</i></div>
|
|
305
305
|
<div class="collapsible-body">
|
|
306
306
|
<!-- Importing Markdown -->
|
|
307
|
-
<zero-md id="md-tableTriggerMotion" manual-render src="doc-md/table-trigger-motion_en.md"></zero-md>
|
|
307
|
+
<zero-md id="md-tableTriggerMotion" manual-render src="doc-md/table-trigger-motion_en.md"><template><style></style></template></zero-md>
|
|
308
308
|
</div>
|
|
309
309
|
</li>
|
|
310
310
|
</ul>
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
<div class="collapsible-header config-section"><h5 class="translate">Other triggers</h5><i class="material-icons">help_outline</i></div>
|
|
352
352
|
<div class="collapsible-body">
|
|
353
353
|
<!-- Importing Markdown -->
|
|
354
|
-
<zero-md id="md-tableTriggerDevices" manual-render src="doc-md/table-trigger-devices_en.md"></zero-md>
|
|
354
|
+
<zero-md id="md-tableTriggerDevices" manual-render src="doc-md/table-trigger-devices_en.md"><template><style></style></template></zero-md>
|
|
355
355
|
</div>
|
|
356
356
|
</li>
|
|
357
357
|
</ul>
|
|
@@ -394,7 +394,7 @@
|
|
|
394
394
|
<div class="collapsible-header config-section"><h5 class="translate">Time based triggers</h5><i class="material-icons">help_outline</i></div>
|
|
395
395
|
<div class="collapsible-body">
|
|
396
396
|
<!-- Importing Markdown -->
|
|
397
|
-
<zero-md id="md-tableTriggerTimes" manual-render src="doc-md/table-trigger-times_en.md"></zero-md>
|
|
397
|
+
<zero-md id="md-tableTriggerTimes" manual-render src="doc-md/table-trigger-times_en.md"><template><style></style></template></zero-md>
|
|
398
398
|
</div>
|
|
399
399
|
</li>
|
|
400
400
|
</ul>
|
|
@@ -449,7 +449,7 @@
|
|
|
449
449
|
<div class="collapsible-header config-section"><h5 class="translate">Zones</h5><i class="material-icons">help_outline</i></div>
|
|
450
450
|
<div class="collapsible-body">
|
|
451
451
|
<!-- Importing Markdown -->
|
|
452
|
-
<zero-md id="md-tableZones" manual-render src="doc-md/table-zones_en.md"></zero-md>
|
|
452
|
+
<zero-md id="md-tableZones" manual-render src="doc-md/table-zones_en.md"><template><style></style></template></zero-md>
|
|
453
453
|
</div>
|
|
454
454
|
</li>
|
|
455
455
|
</ul>
|
|
@@ -647,7 +647,7 @@
|
|
|
647
647
|
</div>
|
|
648
648
|
<div class="row" id="fancy-explanation"> <!-- will be hidden if editTargetVals is false -->
|
|
649
649
|
<!-- Importing Markdown -->
|
|
650
|
-
<zero-md id="md-tableZonesSelectTargets" manual-render src="doc-md/table-zones_select-targets_en.md"></zero-md>
|
|
650
|
+
<zero-md id="md-tableZonesSelectTargets" manual-render src="doc-md/table-zones_select-targets_en.md"><template><style></style></template></zero-md>
|
|
651
651
|
<!-- <span class="translate">dialog.selectSettings.explanation</span> -->
|
|
652
652
|
</div>
|
|
653
653
|
<!-- The Fancy Tree -->
|
|
@@ -703,7 +703,7 @@
|
|
|
703
703
|
<div class="collapsible-header config-section"><h5><span class="translate">Execution settings for zone</span> '<span class="zone-name">Placeholder</span>'</h5><i class="material-icons">help_outline</i></div>
|
|
704
704
|
<div class="collapsible-body">
|
|
705
705
|
<!-- Importing Markdown -->
|
|
706
|
-
<zero-md id="md-tableExecution" manual-render src="doc-md/table-execution_en.md"></zero-md>
|
|
706
|
+
<zero-md id="md-tableExecution" manual-render src="doc-md/table-execution_en.md"><template><style></style></template></zero-md>
|
|
707
707
|
</div>
|
|
708
708
|
</li>
|
|
709
709
|
</ul>
|
|
@@ -764,17 +764,13 @@
|
|
|
764
764
|
<div id="dialog-edit-info" class="modal modal-fixed-footer">
|
|
765
765
|
<div class="modal-content">
|
|
766
766
|
<div class="row" style="padding-left:12px; padding-right:0">
|
|
767
|
-
<!-- START: Header
|
|
768
|
-
<ul
|
|
767
|
+
<!-- START: Header -->
|
|
768
|
+
<ul>
|
|
769
769
|
<li>
|
|
770
|
-
<div class="collapsible-header config-section"><h5><span class="translate">Informational note to the object</span> '<span class="info-name">Placeholder</span>'</h5
|
|
771
|
-
<div class="collapsible-body">
|
|
772
|
-
<!-- Importing Markdown -->
|
|
773
|
-
<zero-md id="md-tableExecution" manual-render src="doc-md/info-text_en.md"></zero-md>
|
|
774
|
-
</div>
|
|
770
|
+
<div class="collapsible-header config-section"><h5><span class="translate">Informational note to the object</span> '<span class="info-name">Placeholder</span>'</h5></div>
|
|
775
771
|
</li>
|
|
776
772
|
</ul>
|
|
777
|
-
<!-- END: Header
|
|
773
|
+
<!-- END: Header -->
|
|
778
774
|
|
|
779
775
|
<!-- textbox info text -->
|
|
780
776
|
<div class="row">
|
package/admin/style.css
CHANGED
|
@@ -29,6 +29,16 @@
|
|
|
29
29
|
.m .row .col.m1 { width: 14%; }
|
|
30
30
|
#tab-area { padding-left:0;padding-right:0; margin-top: 0px; margin-bottom: 1px; background-color:#174475; box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2) }
|
|
31
31
|
|
|
32
|
+
/* Tabs menu react-dark */
|
|
33
|
+
.m.react-dark .tabs .tab a.active, .m .tabs .tab a:hover { color: #2196f3; }
|
|
34
|
+
.m.react-dark .tabs { background-color: #272727 !important;}
|
|
35
|
+
.m.react-dark .md-import { background-color: #E0EBF3; color:yellow !important;}
|
|
36
|
+
|
|
37
|
+
/* Tabs menu react-blue */
|
|
38
|
+
.m.react-blue .tabs .tab a.active, .m .tabs .tab a:hover { color: #2196f3; }
|
|
39
|
+
.m.react-blue .tabs { background-color: #272727 !important;}
|
|
40
|
+
.m.react-blue .md-import { background-color: #E0EBF3; color:yellow !important;}
|
|
41
|
+
|
|
32
42
|
/* Table header */
|
|
33
43
|
table.table-values th.header { background-color:#64BfF6; font-size:90%; text-align:center; line-height: 1em; padding:6px 2px;}
|
|
34
44
|
|
|
@@ -139,6 +149,19 @@ code { padding: 2px 4px; font-size: 1.05em !important; color: #2696ef; backgroun
|
|
|
139
149
|
#dialog-select-settings #fancytree-select-settings {display:inline !important}
|
|
140
150
|
#dialog-select-settings .modal-content {padding-bottom: 0 !important; padding-right: 0 !important; height: calc(100% - 50px)!important }
|
|
141
151
|
|
|
152
|
+
.m.react-dark #dialog-select-settings ul.fancytree-container {
|
|
153
|
+
background-color: #272727;
|
|
154
|
+
}
|
|
155
|
+
.m.react-blue #dialog-select-settings ul.fancytree-container {
|
|
156
|
+
background-color: #272727;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.m.react-dark #dialog-select-settings span.fancytree-title:hover {
|
|
160
|
+
background-color: rgb(59, 59, 59);
|
|
161
|
+
}
|
|
162
|
+
.m.react-blue #dialog-select-settings span.fancytree-title:hover {
|
|
163
|
+
background-color: rgb(59, 59, 59);
|
|
164
|
+
}
|
|
142
165
|
/* Dialog called once SAVE button clicked and verification failed */
|
|
143
166
|
#dialog-save-verification div.error-section { font-size: 1.3em; }
|
|
144
167
|
#dialog-save-verification div.error-section ol>li { color:#d92626; padding-bottom:0.5em !important; }
|
package/admin/words.js
CHANGED
|
@@ -20,6 +20,7 @@ systemDictionary = {
|
|
|
20
20
|
"Further Options": { "en": "Further Options", "de": "Weitere Optionen", "ru": "Дополнительные возможности", "pt": "Opções Adicionais", "nl": "Verdere opties", "fr": "Autres options", "it": "Ulteriori opzioni", "es": "Más opciones", "pl": "Dalsze opcje", "zh-cn": "更多选择"},
|
|
21
21
|
"Hello World": { "en": "Hello World", "de": "Hallo Welt", "ru": "Привет мир", "pt": "Olá Mundo", "nl": "Hallo Wereld", "fr": "Bonjour le monde", "it": "Ciao mondo", "es": "Hola Mundo", "pl": "Witaj świecie", "zh-cn": "你好,世界"},
|
|
22
22
|
"Incorrect configuration": { "en": "Incorrect configuration", "de": "Fehlerhafte Konfiguration", "ru": "Неправильная конфигурация", "pt": "Configuração incorreta", "nl": "Onjuiste configuratie", "fr": "Mauvaise configuration", "it": "Configurazione errata", "es": "Configuracion incorrecta", "pl": "Nieprawidłowa konfiguracja", "zh-cn": "配置错误"},
|
|
23
|
+
"Informational note to the object": { "en": "Informational note to the object", "de": "Informationshinweis zum Objekt", "ru": "Информационное примечание к объекту", "pt": "Nota informativa ao objeto", "nl": "Informatie notitie van het object", "fr": "Note d ' information sur l ' objet", "it": "Nota informativa all'oggetto", "es": "Nota informativa al objeto", "pl": "Informacja na temat obiektu", "zh-cn": "目标说明"},
|
|
23
24
|
"Input Validation": { "en": "Input Validation", "de": "Eingabe-Validierung", "ru": "Проверка ввода", "pt": "Validação de entrada", "nl": "Invoervalidatie", "fr": "Validation d'entrée", "it": "Convalida dell'input", "es": "Validación de entrada", "pl": "Walidacja danych wejściowych", "zh-cn": "输入验证"},
|
|
24
25
|
"JSON state for recent successful zone activations": {"en": "JSON state for recent successful zone activations", "de": "JSON-Datenpunkt for die letzten erfolgreichen Zonen-Aktivierungen", "ru": "Состояние JSON для недавних успешных активаций зоны", "pt": "Estado JSON para recentes ativações de zona bem-sucedidas", "nl": "JSON-status voor recente succesvolle zone-activeringen", "fr": "État JSON pour les activations de zone récentes réussies", "it": "Stato JSON per le recenti attivazioni di zona riuscite", "es": "Estado JSON para activaciones de zona exitosas recientes", "pl": "Stan JSON dla ostatnich udanych aktywacji stref", "zh-cn": "近期成功成功激活区域的JSON状态"},
|
|
25
26
|
"JSON states under .info": { "en": "JSON-Datenpunkte unter .info", "de": "JSON-Datenpunkte unter .info", "ru": "JSON-Datenpunkte под .info", "pt": "JSON-Datenpunkte unter .info", "nl": "JSON-gegevenspunkte onder .info", "fr": "JSON-Datenpunkte unter .info", "it": "JSON-Datenpunkte unter .info", "es": "JSON-Datenpunkte unter .info", "pl": "JSON-Datenpunkte unter .info", "zh-cn": "JSON-Datenpunkte unter .info"},
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "smartcontrol",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.1",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.3.1": {
|
|
7
|
+
"en": "(oelison) dark mode fix #5\nlog info type error #16",
|
|
8
|
+
"de": "(oelison) dunkler modus fix #5\nlog info type fehler #16",
|
|
9
|
+
"ru": "(oelison) темный режим исправить #5\nтип лога ошибка #16",
|
|
10
|
+
"pt": "(oelison) correção de modo escuro #5\nlog info type error #16",
|
|
11
|
+
"nl": "duistere mode fix #5\nquality over quantity (qoq) releases vertaling:",
|
|
12
|
+
"fr": "(oelison) fixation du mode noir #5\njournal info type error #16",
|
|
13
|
+
"it": "(oelison) modalità dark fix #5\nlog info tipo errore #16",
|
|
14
|
+
"es": "(oelison) modo oscuro fijar #5\ntipo de registro error #16",
|
|
15
|
+
"pl": "(oelison) mroczny tryb ułożenia #5\nbłąd logiki #16",
|
|
16
|
+
"uk": "(oelison) темний режим виправити #5\nлог інформація типу помилка #16",
|
|
17
|
+
"zh-cn": "(oelison) 黑暗模式\n第16条"
|
|
18
|
+
},
|
|
6
19
|
"1.3.0": {
|
|
7
20
|
"en": "remove errors and warnings ocured during deploy\ncomment for zones added",
|
|
8
21
|
"de": "entfernen von fehlern und warnungen während des einsatzes\nkommentar zu zonen hinzugefügt",
|
|
@@ -76,18 +89,6 @@
|
|
|
76
89
|
"es": "Solución: si se asignan varios sensores de movimiento a la zona, la zona no se apagará si cualquier otro sensor de movimiento asignado a la misma zona sigue siendo movimiento = verdadero",
|
|
77
90
|
"pl": "Poprawka: jeśli wiele czujników ruchu jest przypisanych do strefy, strefa nie wyłączy się, jeśli jakikolwiek inny czujnik ruchu przypisany do tej samej strefy jest nadal ruch = prawda",
|
|
78
91
|
"zh-cn": "修复:如果分配给区域的多个运动传感器,如果分配给同一区域的任何其他运动传感器仍然是motion = true,则区域将不会关闭"
|
|
79
|
-
},
|
|
80
|
-
"1.0.0": {
|
|
81
|
-
"en": "No changes - just prepared versioning to add adapter to stable repository per Adapter development documentation",
|
|
82
|
-
"de": "Keine Änderungen - nur vorbereitete Versionierung zum Hinzufügen des Adapters zum stabilen Repository gemäß der Adapter-Entwicklungs-Dokumentation",
|
|
83
|
-
"ru": "Без изменений - просто подготовлено управление версиями для добавления адаптера в стабильный репозиторий согласно документации по разработке адаптера.",
|
|
84
|
-
"pt": "Sem alterações - apenas controle de versão preparado para adicionar adaptador ao repositório estável de acordo com a documentação de desenvolvimento do adaptador",
|
|
85
|
-
"nl": "Geen wijzigingen - alleen versiebeheer voorbereid om adapter toe te voegen aan stabiele repository per ontwikkelingsdocumentatie voor adapter",
|
|
86
|
-
"fr": "Aucun changement - juste préparé la gestion des versions pour ajouter l'adaptateur au référentiel stable conformément à la documentation de développement de l'adaptateur",
|
|
87
|
-
"it": "Nessuna modifica: solo il controllo delle versioni preparato per aggiungere l'adattatore al repository stabile secondo la documentazione di sviluppo dell'adattatore",
|
|
88
|
-
"es": "Sin cambios: solo versiones preparadas para agregar el adaptador al repositorio estable según la documentación de desarrollo del adaptador",
|
|
89
|
-
"pl": "Bez zmian - po prostu przygotowałem wersję w celu dodania adaptera do stabilnego repozytorium zgodnie z dokumentacją rozwoju adaptera",
|
|
90
|
-
"zh-cn": "无需更改-只需准备版本,即可根据适配器开发文档将适配器添加到稳定的存储库中"
|
|
91
92
|
}
|
|
92
93
|
},
|
|
93
94
|
"titleLang": {
|
package/lib/trigger-class.js
CHANGED
|
@@ -111,9 +111,9 @@ class Trigger {
|
|
|
111
111
|
} else {
|
|
112
112
|
this.motionDuration = 0;
|
|
113
113
|
}
|
|
114
|
-
if (result.row.briThreshold && parseInt(result.row.briThreshold) > 0 && result.row.briStateId && result.row.briStateId.length > 5) {
|
|
114
|
+
if (result.row.briThreshold && (parseInt(result.row.briThreshold) > 0) && result.row.briStateId && result.row.briStateId.length > 5) {
|
|
115
115
|
this.motionBriStatePath = result.row.briStateId;
|
|
116
|
-
this.motionBriThreshold = result.row.briThreshold;
|
|
116
|
+
this.motionBriThreshold = parseInt(result.row.briThreshold);
|
|
117
117
|
} else {
|
|
118
118
|
this.motionBriStatePath = '';
|
|
119
119
|
this.motionBriThreshold = 0;
|
|
@@ -188,8 +188,8 @@ class Trigger {
|
|
|
188
188
|
/**
|
|
189
189
|
* Prepare: If Motion Sensor triggered - verify brightness if bri is set
|
|
190
190
|
*/
|
|
191
|
-
if (!this.mimicMotion && this.triggerIsMotion && !this.adapter.x.helper.isLikeEmpty(this.motionBriStatePath) && this.adapter.x.helper.isNumber(this.motionBriThreshold) &&
|
|
192
|
-
|
|
191
|
+
if (!this.mimicMotion && this.triggerIsMotion && !this.adapter.x.helper.isLikeEmpty(this.motionBriStatePath) && this.adapter.x.helper.isNumber(this.motionBriThreshold) && this.motionBriThreshold && (this.motionBriThreshold > 0)) {
|
|
192
|
+
|
|
193
193
|
if (this.adapter.config.motionIgnoreBriIfZoneOn && this.adapter.x.zonesIsOn[zoneName]) {
|
|
194
194
|
// Disregard Brightness if zone is on (if this.adapter.config.motionIgnoreBriIfZoneOn == true)
|
|
195
195
|
this.adapter.log.debug(`Trigger [${this.triggerName}] Zone '${zoneName}' is on and new motion detected, therefore, we disregard any current brightness.`);
|
|
@@ -200,7 +200,7 @@ class Trigger {
|
|
|
200
200
|
if (this.adapter.x.helper.isLikeEmpty(briStateValCurrent) || !this.adapter.x.helper.isNumber(briStateValCurrent) || parseInt(briStateValCurrent) < 0) {
|
|
201
201
|
// Bri not valid, so disregard bri and continue
|
|
202
202
|
this.adapter.log.debug(`Trigger [${this.triggerName}] Brightness of ${briStateValCurrent} of ${this.motionBriStatePath} is not valid. State Value: [${briStateValCurrent}]. Therefore, bri will be disregarded and we continue.`);
|
|
203
|
-
} else if (parseInt(briStateValCurrent) <
|
|
203
|
+
} else if (parseInt(briStateValCurrent) < this.motionBriThreshold) {
|
|
204
204
|
// continue
|
|
205
205
|
this.adapter.log.debug(`Trigger [${this.triggerName}] Brightness of ${briStateValCurrent} is < threshold of ${this.motionBriThreshold}, so we continue.`);
|
|
206
206
|
} else {
|
package/main.js
CHANGED
|
@@ -404,7 +404,6 @@ class SmartControl extends utils.Adapter {
|
|
|
404
404
|
if (!res) {
|
|
405
405
|
throw(`Certain error(s) occurred in asyncCreateStates().`);
|
|
406
406
|
}
|
|
407
|
-
|
|
408
407
|
// Delete all states which are no longer used.
|
|
409
408
|
const allAdapterStates = await this.getStatesOfAsync('options');
|
|
410
409
|
if (allAdapterStates != undefined) {
|
|
@@ -413,7 +412,7 @@ class SmartControl extends utils.Adapter {
|
|
|
413
412
|
if ( (statePathsOnly.indexOf(statePath) == -1) && (statePath.endsWith('active') || (statePath.endsWith('name') ) ) ) {
|
|
414
413
|
// State is no longer used.
|
|
415
414
|
await this.delObjectAsync(statePath); // Delete state.
|
|
416
|
-
this.x.helper.logExtendedInfo(`State
|
|
415
|
+
this.x.helper.logExtendedInfo(`State ${statePath} deleted, since option does no longer exist.`);
|
|
417
416
|
}
|
|
418
417
|
}
|
|
419
418
|
}
|
|
@@ -429,10 +428,17 @@ class SmartControl extends utils.Adapter {
|
|
|
429
428
|
if(typeof optionObj.row[optionObj.field] == 'object') {
|
|
430
429
|
val = JSON.stringify(optionObj.row[optionObj.field]);
|
|
431
430
|
} else {
|
|
432
|
-
|
|
431
|
+
if (lpStatePath.endsWith('briThreshold')) {
|
|
432
|
+
val = parseInt(optionObj.row[optionObj.field]);
|
|
433
|
+
}
|
|
434
|
+
else if (lpStatePath.endsWith('duration')) {
|
|
435
|
+
val = parseInt(optionObj.row[optionObj.field]);
|
|
436
|
+
}
|
|
437
|
+
else {
|
|
438
|
+
val = optionObj.row[optionObj.field];
|
|
439
|
+
}
|
|
433
440
|
}
|
|
434
441
|
await this.setStateAsync(lpStatePath, {val:val, ack:true});
|
|
435
|
-
|
|
436
442
|
}
|
|
437
443
|
|
|
438
444
|
/**
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Hier kann eine Objektbeschreibung abgelegt werden.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
You can set here some notes for your object.
|