Skip to content

Commit e506d3c

Browse files
committed
added example
1 parent a9a5dc5 commit e506d3c

File tree

4 files changed

+88
-5
lines changed

4 files changed

+88
-5
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Install of a specific Version in Redmatic (on a Homematic):
1414
- `npm install --save --no-package-lock --global-style --save-prefix="~" --production node-red-contrib-sun-position@2.0.0`
1515

1616
This can be also used to go back to an older Version.
17-
### 2.2.0: enhancement
17+
### 2.2.0-beta: enhancement
1818

1919
- general
2020
- first implementation of tests with `mocha` and some changes due to the test implementation (inject enhance and delay-until)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
[
2+
{
3+
"id": "a5f09193a7042daa",
4+
"type": "rdg-delay-until",
5+
"z": "5f922dadd3c06750",
6+
"name": "",
7+
"positionConfig": "",
8+
"time": "10:00",
9+
"timeType": "entered",
10+
"offset": 0,
11+
"offsetType": "none",
12+
"offsetMultiplier": 60000,
13+
"queuingBehavior": "all",
14+
"flushMsgs": "",
15+
"flushMsgsType": "none",
16+
"flushMsgsValue": "true",
17+
"flushMsgsValueType": "bool",
18+
"dropMsgs": "",
19+
"dropMsgsType": "none",
20+
"dropMsgsValue": "true",
21+
"dropMsgsValueType": "bool",
22+
"enqueueMsg": "",
23+
"enqueueMsgType": "none",
24+
"enqueueMsgValue": "true",
25+
"enqueueMsgValueType": "bool",
26+
"ctrlPropChange": false,
27+
"ctrlPropValue": "",
28+
"ctrlPropValueType": "delete",
29+
"tsCompare": "0",
30+
"x": 710,
31+
"y": 640,
32+
"wires": [
33+
[
34+
"76deb05ef54bb8f9"
35+
]
36+
]
37+
},
38+
{
39+
"id": "e926c223c334b655",
40+
"type": "inject",
41+
"z": "5f922dadd3c06750",
42+
"name": "",
43+
"props": [
44+
{
45+
"p": "payload"
46+
},
47+
{
48+
"p": "topic",
49+
"vt": "str"
50+
}
51+
],
52+
"repeat": "",
53+
"crontab": "",
54+
"once": false,
55+
"onceDelay": 0.1,
56+
"topic": "",
57+
"payload": "",
58+
"payloadType": "date",
59+
"x": 540,
60+
"y": 640,
61+
"wires": [
62+
[
63+
"a5f09193a7042daa"
64+
]
65+
]
66+
},
67+
{
68+
"id": "76deb05ef54bb8f9",
69+
"type": "debug",
70+
"z": "5f922dadd3c06750",
71+
"name": "",
72+
"active": true,
73+
"tosidebar": true,
74+
"console": false,
75+
"tostatus": false,
76+
"complete": "false",
77+
"statusVal": "",
78+
"statusType": "auto",
79+
"x": 910,
80+
"y": 640,
81+
"wires": []
82+
}
83+
]

nodes/static/htmlglobal.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -356,26 +356,26 @@ function getTypes(node) { // eslint-disable-line no-unused-vars
356356
label: node._('node-red-contrib-sun-position/position-config:common.types.randomNumber','randomNumber'),
357357
icon: 'icons/node-red-contrib-sun-position/inputTypeRandomNumber.svg',
358358
hasValue: true,
359-
// eslint-disable-next-line no-useless-escape
360359
// @ts-ignore
360+
// eslint-disable-next-line no-useless-escape
361361
validate: /** @type {runtimeRED} */ RED.validators.regex(/^(?:[1-9]|-0\.|0\.|-)\d*(?:\.\d+)?([\/|](?:[1-9]|-0\.|0\.|-)\d*(?:\.\d+)?)?$/)()
362362
},
363363
randmNumCachedDay: {
364364
value: 'randmNumCachedDay',
365365
label: node._('node-red-contrib-sun-position/position-config:common.types.randmNumCachedDay','randmNumCachedDay'),
366366
icon: 'icons/node-red-contrib-sun-position/inputTypeRandomNumber.svg',
367367
hasValue: true,
368-
// eslint-disable-next-line no-useless-escape
369368
// @ts-ignore
369+
// eslint-disable-next-line no-useless-escape
370370
validate: /** @type {runtimeRED} */ RED.validators.regex(/^(?:[1-9]|-0\.|0\.|-)\d*(?:\.\d+)?([\/|](?:[1-9]|-0\.|0\.|-)\d*(?:\.\d+)?)?$/)()
371371
},
372372
randmNumCachedWeek: {
373373
value: 'randmNumCachedWeek',
374374
label: node._('node-red-contrib-sun-position/position-config:common.types.randmNumCachedWeek','randmNumCachedWeek'),
375375
icon: 'icons/node-red-contrib-sun-position/inputTypeRandomNumber.svg',
376376
hasValue: true,
377-
// eslint-disable-next-line no-useless-escape
378377
// @ts-ignore
378+
// eslint-disable-next-line no-useless-escape
379379
validate: /** @type {runtimeRED} */ RED.validators.regex(/^(?:[1-9]|-0\.|0\.|-)\d*(?:\.\d+)?([\/|](?:[1-9]|-0\.|0\.|-)\d*(?:\.\d+)?)?$/)()
380380
},
381381
TimeSun: {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-red-contrib-sun-position",
3-
"version": "2.2.0-betha",
3+
"version": "2.2.0-beta",
44
"description": "NodeRED nodes to get sun and moon position",
55
"keywords": [
66
"node-red",

0 commit comments

Comments
 (0)