Script and how to use them

Hi, I’m starting with script in OH3 and inmediatly I have 3 question.

  1. If I allready create a Script, how can i call it from a rule?
  2. If scrips are not for call it from rule, what are there for?
  3. is there any switch in Blocky?

Thanks

  • Scripts (in the UI) are just rules with no triggers, no conditions, and only one “execute a script” action
  • You can run them from a rule with the “run rules” action, but I don’t know for sure if they will block the calling rule, or if you can return a value and use it for instance in subsequent script actions of the calling rule (I think that’s the case and you can but have to check).
  • no switch in Blockly I think but you can add an if block and click the little gears button and add as many “else if/else” as you want.

But I can’t find this options. I can find to run a new blocky or script, but not an allready create one.

What are the expect use for them?
When they were add.