Skip to content

Commit

Permalink
[jsscripting] Upgrade openhab-js to 4.7.3 (openhab#16112)
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Hotze <[email protected]>
  • Loading branch information
florian-h05 authored Dec 25, 2023
1 parent 20a6eee commit 6540d0d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions bundles/org.openhab.automation.jsscripting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
```
Expand All @@ -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!"
```
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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");
```
Expand Down
2 changes: 1 addition & 1 deletion bundles/org.openhab.automation.jsscripting/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>[email protected].2</ohjs.version>
<ohjs.version>[email protected].3</ohjs.version>
</properties>

<build>
Expand Down

0 comments on commit 6540d0d

Please sign in to comment.