iobroker.drag-indicator 2.1.3 → 2.1.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 BenAhrdt <bsahrdt@gmail.com>
3
+ Copyright (c) 2024 BenAhrdt <bsahrdt@gmail.com>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -21,6 +21,12 @@ e.g. you can use it for power or temperature values.
21
21
  Placeholder for the next version (at the beginning of the line):
22
22
  ### **WORK IN PROGRESS**
23
23
  -->
24
+ ### 2.1.5 (2024-08-09)
25
+ * (BenAhrdt) changes for check and service bot
26
+
27
+ ### 2.1.4 (2023-11-26)
28
+ * (BenAhrdt) Add actual value to observed values (observe more times easily possible)
29
+
24
30
  ### 2.1.3 (2023-11-12)
25
31
  * (BenAhrdt) translation for uk added
26
32
 
@@ -75,7 +81,7 @@ e.g. you can use it for power or temperature values.
75
81
  ## License
76
82
  MIT License
77
83
 
78
- Copyright (c) 2023 BenAhrdt <bsahrdt@gmail.com>
84
+ Copyright (c) 2024 BenAhrdt <bsahrdt@gmail.com>
79
85
 
80
86
  Permission is hereby granted, free of charge, to any person obtaining a copy
81
87
  of this software and associated documentation files (the "Software"), to deal
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "drag-indicator",
4
- "version": "2.1.3",
4
+ "version": "2.1.5",
5
5
  "news": {
6
+ "2.1.5": {
7
+ "en": "changes for check and service bot",
8
+ "de": "änderungen für check- und service-bot",
9
+ "ru": "изменения для проверки и обслуживания бота",
10
+ "pt": "alterações para verificação e serviço bot",
11
+ "nl": "wijzigingen voor controle en service bot",
12
+ "fr": "modifications pour vérifier et service bot",
13
+ "it": "modifiche per check e service bot",
14
+ "es": "cambios para cheque y servicio bot",
15
+ "pl": "zmiany dotyczące bota kontrolnego i serwisowego",
16
+ "uk": "зміни для перевірки та сервісу",
17
+ "zh-cn": "检查和服务机器人的更改"
18
+ },
19
+ "2.1.4": {
20
+ "en": "Add actual value to observed values (observe more times easily possible)",
21
+ "de": "Ist-Wert zu beobachteten Werten hinzufügen (Beobachten Sie mehr Mal leicht möglich)",
22
+ "ru": "Добавьте действительное значение для наблюдаемых значений (сохранить более раз легко возможно)",
23
+ "pt": "Adicione valor real aos valores observados (observe mais vezes facilmente possível)",
24
+ "nl": "Voeg echte waarde toe om waarden te observeren",
25
+ "fr": "Ajouter la valeur réelle aux valeurs observées (observez plus de fois facilement possible)",
26
+ "it": "Aggiungi valore effettivo ai valori osservati (osserva più volte facilmente possibile)",
27
+ "es": "Añadir valor real a valores observados (observar más veces fácilmente posible)",
28
+ "pl": "Dokładna wartość do obserwowanych wartości (obserwuje się bardziej łatwo)",
29
+ "uk": "Додати фактичне значення, щоб побачити значення (зберігати більше разів легко)",
30
+ "zh-cn": "增加观察到价值的实际价值(更易于使用)"
31
+ },
6
32
  "2.1.3": {
7
33
  "en": "translation for uk added",
8
34
  "de": "übersetzung für uk zusätzlich",
@@ -67,35 +93,8 @@
67
93
  "pl": "uaktualnianie scenariusza V3",
68
94
  "zh-cn": "附录五3",
69
95
  "uk": "оновлено для випуску сценарію V3"
70
- },
71
- "2.0.8": {
72
- "en": "updated to release script V3",
73
- "de": "aktualisiert zum Release-Skript V3",
74
- "ru": "обновлено для выпуска скрипта V3",
75
- "pt": "atualizado para lançar script V3",
76
- "nl": "vertaling:",
77
- "fr": "mise à jour du script V3",
78
- "it": "aggiornato allo script di rilascio V3",
79
- "es": "actualizado para lanzar script V3",
80
- "pl": "uaktualnianie scenariusza V3",
81
- "zh-cn": "附录五3",
82
- "uk": "оновлено для випуску сценарію V3"
83
- },
84
- "2.0.7": {
85
- "en": "cronjob wizard removed and complex mode enabled",
86
- "de": "cronjob assistent entfernt und komplexer modus aktiviert",
87
- "ru": "cronjob wizard удален и комплексный режим включен",
88
- "pt": "assistente cronjob removido e modo complexo habilitado",
89
- "nl": "quality over quantity (qoq) releases vertaling:",
90
- "fr": "cronjob wizard enlevé et mode complexe activé",
91
- "it": "mago di cronjob rimosso e modalità complessa abilitata",
92
- "es": "asistente de cronjob eliminado y modo complejo habilitado",
93
- "pl": "cronjob wizard usunął i złożony tryb pozwalał usunąć się",
94
- "zh-cn": "被撤职和复杂模式的复杂化",
95
- "uk": "Майстер cronjob видалено та ввімкнено складний режим"
96
96
  }
97
97
  },
98
- "title": "Drag-Indicator",
99
98
  "titleLang": {
100
99
  "en": "Drag-Indicator",
101
100
  "de": "Schleppzeiger",
@@ -126,19 +125,23 @@
126
125
  "BenAhrdt <bsahrdt@gmail.com>"
127
126
  ],
128
127
  "keywords": [
128
+ "ioBroker",
129
129
  "drag-indicator",
130
130
  "Schleppzeiger",
131
131
  "min",
132
132
  "max"
133
133
  ],
134
- "license": "MIT",
134
+ "licenseInformation": {
135
+ "license": "MIT",
136
+ "type": "free"
137
+ },
135
138
  "platform": "Javascript/Node.js",
136
- "main": "main.js",
137
139
  "icon": "drag-indicator.png",
138
140
  "enabled": true,
139
141
  "extIcon": "https://raw.githubusercontent.com/BenAhrdt/ioBroker.drag-indicator/main/admin/drag-indicator.png",
140
142
  "readme": "https://github.com/BenAhrdt/ioBroker.drag-indicator/blob/main/README.md",
141
143
  "loglevel": "info",
144
+ "tier": 2,
142
145
  "mode": "daemon",
143
146
  "type": "misc-data",
144
147
  "compact": true,
@@ -156,7 +159,7 @@
156
159
  ],
157
160
  "dependencies": [
158
161
  {
159
- "js-controller": ">=2.0.0"
162
+ "js-controller": ">=5.0.19"
160
163
  }
161
164
  ]
162
165
  },
package/main.js CHANGED
@@ -35,7 +35,8 @@ class DragIndicator extends utils.Adapter {
35
35
  this.additionalIds = {
36
36
  max : ".max",
37
37
  min : ".min",
38
- reset : ".reset"
38
+ reset : ".reset",
39
+ actual : ".actual"
39
40
  };
40
41
 
41
42
  this.observedValuesId = "observed_Values.";
@@ -151,12 +152,14 @@ class DragIndicator extends utils.Adapter {
151
152
  role: common.role,
152
153
  unit: common.unit,
153
154
  read: true,
154
- write: true
155
+ write: this.additionalIds[myId] !== this.additionalIds.actual
155
156
  },
156
157
  native: {},
157
158
  });
158
- this.log.debug(`state ${tempId} added / activated`);
159
- this.subscribeStates(tempId);
159
+ if(this.additionalIds[myId] !== this.additionalIds.actual){
160
+ this.log.debug(`state ${tempId} added / activated`);
161
+ this.subscribeStates(tempId);
162
+ }
160
163
  const lastState = await this.getStateAsync(tempId);
161
164
  if(lastState !== undefined && lastState !== null){
162
165
  this.activeStatesLastAdditionalValues[this.namespace + "." + tempId] = lastState.val;
@@ -314,18 +317,19 @@ class DragIndicator extends utils.Adapter {
314
317
  if(this.activeStates[id]){
315
318
  let tempId = this.createStatestring(id) + this.additionalIds.max;
316
319
  if(state.val > this.activeStatesLastAdditionalValues[this.namespace + "." + tempId]){
317
- const tempValue = state.val;
318
- this.activeStatesLastAdditionalValues[this.namespace + "." + tempId] = tempValue;
319
- this.setStateAsync(tempId,tempValue,true);
320
+ this.activeStatesLastAdditionalValues[this.namespace + "." + tempId] = state.val;
321
+ this.setStateAsync(tempId,state.val,true);
320
322
  }
321
323
  else{
322
324
  tempId = this.createStatestring(id) + this.additionalIds.min;
323
325
  if(state.val < this.activeStatesLastAdditionalValues[this.namespace + "." + tempId]){
324
- const tempValue = state.val;
325
- this.activeStatesLastAdditionalValues[this.namespace + "." + tempId] = tempValue;
326
- this.setStateAsync(tempId,tempValue,true);
326
+ this.activeStatesLastAdditionalValues[this.namespace + "." + tempId] = state.val;
327
+ this.setStateAsync(tempId,state.val,true);
327
328
  }
328
329
  }
330
+ // Set actual value to internal state
331
+ tempId = this.createStatestring(id) + this.additionalIds.actual;
332
+ this.setStateAsync(tempId,state.val,true);
329
333
  }
330
334
 
331
335
  // Check Changes in internal States (also if id is active state)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.drag-indicator",
3
- "version": "2.1.3",
3
+ "version": "2.1.5",
4
4
  "description": "Shows the min and max of a selected value",
5
5
  "author": {
6
6
  "name": "BenAhrdt",
@@ -19,33 +19,34 @@
19
19
  "url": "https://github.com/BenAhrdt/ioBroker.drag-indicator"
20
20
  },
21
21
  "engines": {
22
- "node": ">= 16"
22
+ "node": ">= 18"
23
23
  },
24
24
  "dependencies": {
25
- "@iobroker/adapter-core": "^3.0.4",
25
+ "@iobroker/adapter-core": "^3.1.6",
26
26
  "node-schedule": "^2.1.1"
27
27
  },
28
28
  "devDependencies": {
29
- "@alcalzone/release-script": "3.6.0",
30
- "@alcalzone/release-script-plugin-iobroker": "3.6.0",
31
- "@alcalzone/release-script-plugin-license": "3.5.9",
32
- "@iobroker/adapter-dev": "^1.2.0",
33
- "@iobroker/testing": "^4.1.0",
34
- "@types/chai": "^4.3.9",
35
- "@types/chai-as-promised": "^7.1.7",
36
- "@types/mocha": "^10.0.3",
37
- "@types/node": "^20.8.10",
38
- "@types/proxyquire": "^1.3.30",
39
- "@types/sinon": "^10.0.16",
40
- "@types/sinon-chai": "^3.2.11",
41
- "chai": "^4.3.10",
42
- "chai-as-promised": "^7.1.1",
43
- "eslint": "^8.52.0",
44
- "mocha": "^10.2.0",
29
+ "@alcalzone/release-script": "^3.8.0",
30
+ "@alcalzone/release-script-plugin-iobroker": "^3.7.2",
31
+ "@alcalzone/release-script-plugin-license": "^3.7.0",
32
+ "@alcalzone/release-script-plugin-manual-review": "^3.7.0",
33
+ "@iobroker/adapter-dev": "^1.3.0",
34
+ "@iobroker/testing": "^4.1.3",
35
+ "@types/chai": "^4.3.11",
36
+ "@types/chai-as-promised": "^7.1.8",
37
+ "@types/mocha": "^10.0.7",
38
+ "@types/node": "^22.0.2",
39
+ "@types/proxyquire": "^1.3.31",
40
+ "@types/sinon": "^17.0.3",
41
+ "@types/sinon-chai": "^3.2.12",
42
+ "chai": "^4.5.0",
43
+ "chai-as-promised": "^8.0.0",
44
+ "eslint": "^8.57.0",
45
+ "mocha": "^10.7.0",
45
46
  "proxyquire": "^2.1.3",
46
- "sinon": "^17.0.0",
47
+ "sinon": "^18.0.0",
47
48
  "sinon-chai": "^3.7.0",
48
- "typescript": "~5.2.2"
49
+ "typescript": "~5.5.4"
49
50
  },
50
51
  "main": "main.js",
51
52
  "files": [