Updated Switch scenes randomly (markdown)

WarmUpTill 2023-08-08 20:29:39 +02:00
parent 5449e5ee70
commit 836bcd7af7

@ -1,32 +1,4 @@
Depending on what your requirements are different approaches can be used to randomly switch to one scene of a list of scenes.
* If you want to switch to each scene for the same or a random amount of time before continuing to the next one using [Scene Groups](Scene-groups) would be recommended.
* If you instead want to switch to each scene for a predetermined amount of time using the "Random" macro action is likely the best approach.
## Scene Groups
As first step you will have to set up a [Scene Groups](Scene-groups) containing all the scenes you want to randomly switch to.
Make sure to set the type to "Random".
![RandomSceneGroup](https://user-images.githubusercontent.com/19472752/167907331-de2ac528-4965-40dd-9b17-aace57fe5dda.PNG)
Next [create a macro](Macros#creating-a-new-macro) to switch to switch to this scene group.
As a condition chose whatever best fits your needs. In this example we will continuously switch scenes randomly so we choose the "Plugin state" condition type.
The action will consist of a scene switch action (1) and a wait action (2).
As the scene switch target select the previously created scene group.
Finally configure the wait action to your needs.
In this example it was set to wait for a random duration between 5 and 10 seconds.
![RandomMacro](https://user-images.githubusercontent.com/19472752/167908266-32b331e0-960d-4a43-a5ff-8544e8a080fb.PNG)
This macro will now continuously switch to a scene from the [Scene Groups](Scene-groups) wait for a random duration between 5 and 10 seconds before triggering the next scene switch.
To not interfere with other macros you might have created you can mark this macro to run in parallel to other macros (3).
## Random macro action
This approach is more tedious to set up than the one using [Scene Groups](Scene-groups) but will allow you configure how long to stay on each particular scene before continuing to the next one.
## Random scene switching
First [create macros](Macros#creating-a-new-macro) for each scene you want to randomly switch to.
These macros will not require any conditions as they will be executed by another macros.