]> git.basschouten.com Git - openhab-addons.git/commitdiff
[jsscripting] Upgrade openhab-js to 4.7.3 (#16112)
authorFlorian Hotze <florianh_dev@icloud.com>
Mon, 25 Dec 2023 22:52:59 +0000 (23:52 +0100)
committerGitHub <noreply@github.com>
Mon, 25 Dec 2023 22:52:59 +0000 (23:52 +0100)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
bundles/org.openhab.automation.jsscripting/README.md
bundles/org.openhab.automation.jsscripting/pom.xml

index e760a446367a4212ef7918b7e71a6470544073df..00a247ebe00fc5b86ec4485b45d64051d5d9d36d 100644 (file)
@@ -231,7 +231,7 @@ var myVar = 'Hello world!';
 // Schedule a timer that expires in ten seconds
 setTimeout(() => {
   console.info(`Timer expired with variable value = "${myVar}"`);
-}, 1000);
+}, 10000);
 
 myVar = 'Hello mutation!'; // When the timer runs, it will log "Hello mutation!" instead of "Hello world!"
 ```
@@ -245,7 +245,7 @@ var myVar = 'Hello world!';
 // Schedule a timer that expires in ten seconds
 setTimeout((myVariable) => {
   console.info(`Timer expired with variable value = "${myVariable}"`);
-}, 1000, myVar); // Pass one or more variables as parameters here. They are passed through to the callback function.
+}, 10000, myVar); // Pass one or more variables as parameters here. They are passed through to the callback function.
 
 myVar = 'Hello mutation!'; // When the timer runs, it will log "Hello world!"
 ```
@@ -496,12 +496,12 @@ The Things namespace allows to interact with openHAB Things.
 See [openhab-js : things](https://openhab.github.io/openhab-js/things.html) for full API documentation.
 
 - things : <code>object</code>
-  - .getThing(uid, nullIfMissing) ⇒ <code>Thing</code>
-  - .getThings() ⇒ <code>Array.&lt;Thing&gt;</code>
+  - .getThing(uid) ⇒ <code>Thing|null</code>
+  - .getThings() ⇒ <code>Array[Thing]</code>
 
 #### `getThing(uid, nullIfMissing)`
 
-Calling `getThing(...)` returns a `Thing` object with the following properties:
+Calling `getThing(uid)` returns a `Thing` object with the following properties:
 
 - Thing : <code>object</code>
   - .bridgeUID ⇒ <code>String</code>
@@ -1094,7 +1094,7 @@ Operations and conditions can also optionally take functions:
 
 ```javascript
 rules.when().item("F1_light").changed().then(event => {
-    console.log(event);
+  console.log(event);
 }).build("Test Rule", "My Test Rule");
 ```
 
index c350bd81f1471f00dbb0d2339dfbdc4907b6e23e..26e0d6481197a808a1f560c0be4f38f6585bfad8 100644 (file)
@@ -24,7 +24,7 @@
     </bnd.importpackage>
     <graal.version>22.0.0.2</graal.version> <!-- DO NOT UPGRADE: 22.0.0.2 is the latest version working on armv7l / OpenJDK 11.0.16 & armv7l / Zulu 17.0.5+8 -->
     <oh.version>${project.version}</oh.version>
-    <ohjs.version>openhab@4.7.2</ohjs.version>
+    <ohjs.version>openhab@4.7.3</ohjs.version>
   </properties>
 
   <build>