-
-
Notifications
You must be signed in to change notification settings - Fork 1
Change scenario by notification from other modules
Seongnoh Sean Yi edited this page Aug 9, 2024
·
2 revisions
Since 1.1.0
You want to display three scenes sequentially (SceneA -> SceneB -> SceneC -> SceneA -> ...) in the usual time.
But when the specific notification(maybe from MMM-Remote-Control or MMM-Button or ...) is incoming, you want to show another scenario (SceneD -> SceneE) and then halt there until the other notification arrives.
scenario: [
{ name: "SceneA", previous: "SceneC", ... },
{ name: "SceneB", ... },
{ name: "SceneC", next: "SceneA", ... },
{ name: "SceneD", previous: false, ... },
{ name: "SceneE", next: false, ... }
]Normally, the scenario would flow like this: SceneA -> SceneB -> SceneC -> SceneA -> SceneB -> ...
But when the module meets the SCENE_PLAY ('SceneD') notification, the flow moves to SceneD, drives to SceneE in a while, and then gets stuck on that because the next does not work.
You can return to a normal scenario with the SCENE_PLAY ('SceneA') notification anytime.