Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsr223.md: add example for scriptExtension.get() #2418

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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