How to run scene from rule

Hi,

is there a way to call a scene from within a rule?

best regards
Daniel

Yes absolutely.

In jruby:
rules[“id”] gives you the rule object for the given id, which supports the trigger method (aliased as run).

rules["scene_id"].run

in jsscripting: rules - Documentation

rules.runRule("scene_id")
2 Likes

In Blockly:

2 Likes

There’s also a “Scenes, Scripts, & Rules” Action.

1 Like

Thanks a lot! :+1:
I found the function runRule, but it was not clear to me, that it works for szenes, too.

I once documented the various possibilities here:

Maybe we should add tabs for the various “languages” here as well :thinking:

2 Likes