From 6540d0dda9e7a54deb286556cdee01dd007af32e Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Mon, 25 Dec 2023 23:52:59 +0100 Subject: [PATCH] [jsscripting] Upgrade openhab-js to 4.7.3 (#16112) Signed-off-by: Florian Hotze --- bundles/org.openhab.automation.jsscripting/README.md | 12 ++++++------ bundles/org.openhab.automation.jsscripting/pom.xml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bundles/org.openhab.automation.jsscripting/README.md b/bundles/org.openhab.automation.jsscripting/README.md index e760a446367a4..00a247ebe00fc 100644 --- a/bundles/org.openhab.automation.jsscripting/README.md +++ b/bundles/org.openhab.automation.jsscripting/README.md @@ -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 : object - - .getThing(uid, nullIfMissing) ⇒ Thing - - .getThings() ⇒ Array.<Thing> + - .getThing(uid) ⇒ Thing|null + - .getThings() ⇒ Array[Thing] #### `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 : object - .bridgeUID ⇒ String @@ -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"); ``` diff --git a/bundles/org.openhab.automation.jsscripting/pom.xml b/bundles/org.openhab.automation.jsscripting/pom.xml index c350bd81f1471..26e0d6481197a 100644 --- a/bundles/org.openhab.automation.jsscripting/pom.xml +++ b/bundles/org.openhab.automation.jsscripting/pom.xml @@ -24,7 +24,7 @@ 22.0.0.2 ${project.version} - openhab@4.7.2 + openhab@4.7.3