mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[groovyscripting] Described a way for code reuse (#16361)
Signed-off-by: Oleg Andreych <kjiec4@gmail.com> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
parent
0c2b95e48f
commit
68fa26ce5d
@ -21,6 +21,13 @@ log:set DEBUG org.openhab.core.automation
|
||||
|
||||
For more information on the available APIs in scripts see the [JSR223 Scripting]({{base}}/configuration/jsr223.html) documentation.
|
||||
|
||||
## Code reuse
|
||||
|
||||
One can place *.groovy files with Groovy classes under `automation/groovy` configuration directory.
|
||||
Those classes can be imported in JSR-223 scripts or the UI rules action with the usual Groovy `import` statement.
|
||||
|
||||
To apply shared code changes, one has to restart the `openHAB Core :: Bundles :: Automation` bundle on the Console or an openHAB instance altogether.
|
||||
|
||||
## Script Examples
|
||||
|
||||
Groovy scripts provide access to almost all the functionality in an openHAB runtime environment.
|
||||
|
Loading…
Reference in New Issue
Block a user