|  Developer
Updated on December 2, 2022

isSceneState

  • Execute scene if another scene is finished with corresponding status or if another scene is enabled or disabled.
  • This feature is available since version.
Edit
Field Type Required Description
blockOptions.method.args.scene sceneId + The id of target scene
blockOptions.method.args.state token + The state of target scene. Possible values: , , , , , . The tokens , , mean corresponding result of target scene. The token means any result of target scene. The tokens , mean target scene is enabled or disabled.
Edit
Internal error code Message Data
SCENE_WHEN_RECURSIVE_EXECUTE Scene contain conditions with current scene id scenes.when.recursive_execute
SCENE_CYCLE_DETECTED Requested action will create an infinite loop in scenes execution scenes.cycle.detected
SCENE_DOES_NOT_EXIST The scene with this id does not exist ezlo.scenes.not.exist
Edit
				
					"when" : [{
   "blockType":"when",
   "blockOptions":{
      "method":{
         "name":"isSceneState",
         "args":{
            "scene":"scene",
            "state":"state"
         }
      }
   },
   "fields":[
      {
         "name":"scene",
         "type":"sceneId",
         "value": "5c7ff48b7f00002a07a408e3"
      },
      {
         "name":"state",
         "type":"token",
         "options":[
             {
                 "value":"failed",
                 "label":{
                     "lang_tag":"scene_state_failed",
                     "text":"Scene failed"
                 }
             },
             {
                 "value":"successful",
                 "label":{
                     "lang_tag":"scene_state_successful",
                     "text":"Scene finished successfully"
                 }
             },
             {
                 "value":"changed",
                 "label":{
                     "lang_tag":"scene_state_any",
                     "text":"Scenes was triggered to any state"
                 }
             },
             {
                 "value":"off",
                 "label":{
                     "lang_tag":"scene_state_any",
                     "text":"Any state"
                 }
             },
             {
                 "value":"on",
                 "label":{
                     "lang_tag":"scene_state_any",
                     "text":"Any state"
                 }
             }
         ],
         "value": "finished"
      }
   ]
}]