Skip to content

Commit

Permalink
jsr223.md: add example for scriptExtension.get() (#2418)
Browse files Browse the repository at this point in the history
  • Loading branch information
dilyanpalauzov authored Dec 8, 2024
1 parent 158ced1 commit 7379411
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions configuration/jsr223.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ Note that prior to openHAB 3, script ordering was performed alphanumerically bas
To facilitate JSR223 scripting, several openHAB-related variables are automatically predefined within `ScriptExtension` presets.
They can be loaded into the script context using `scriptExtension.importPreset(String preset)`, e.g. `scriptExtension.importPreset("RuleSimple")`.
The `default` preset is preloaded, so it does not require importing.
With `scriptExtension.get("automationManager")` the `automationManager` can be made available without loading a preset.

- [Overview](#overview)
- [Example rules for a first impression](#example-rules-for-a-first-impression)
Expand Down

0 comments on commit 7379411

Please sign in to comment.