|  Developer
Updated on June 23, 2022

hub.scenes.edit

  • Version: 1.0
  • Classes: UI
  • Title: Scene manager categories
  • Description: Update the scene json by it’s id.
Edit
Field Type Required Description
_id string + rule identifier
eo JsonObject + Json object of the rule description. Please see hub.scenes.create
Edit
Broadcasts Description
hub.scene.changed Updating the information about the scene.
Edit
  • Empty result or an error
Edit
Code Message Data
-32600 Bad request,
-32600 Bad request,
-32500 Scene is ill formed. Can’t parse when block
-32500 Scene is ill formed. Can’t parse then block
-32500 Scene is failed. There is no such method
-32500 Scene contain conditions for not intersect numbers values inside of AND condition
-32500 Scene contain conditions for same functionality inside of AND condition
-32500 Scene contain conditions for same functionality inside of AND condition
-32500 Scene cannot contain “isInterval” conditions along with other time based condition in the same AND operator
-32500 Failed to acquire anonymous plugin!
-32500 Expression error
-32500 Item does not exist
-32500 Item value type error
-32500 Expression does not exist
-32500 Scene has duplicate identifiers
  • Updated in : allowed creating scenes with multiple time conditions in the same AND operator. This applies to , , . But it is still forbidden to use conditions with other time-based conditions in the same AND operator.
Edit
Here is an example of usage:
Call:
				
					{
    "id": "_ID_",
    "jsonrpc": "2.0",
    "method": "hub.scenes.edit",
    "params" :
     {
         "_id": "5c5318aa518af44041018347",
         "eo": {
             "_id": "5c5318aa518af44041018347",
             "enabled": true,
             "group_id": null,
             "is_group": false,
             "name": "NewR",
             "parent_id": "5c050abd518af4117b2e2496",
             "house_modes" : [
                "1",
                "2", 
                "4"
            ],
             "then": [
                 {
                      "blockOptions":{
                          "method":{
                              "args":{
                                  "item":"item",
                                  "value":"value"
                              },
                              "name":"setItemValue"
                          }
                      },
                      "blockType":"then",
                      "fields":[
                          {
                              "name":"item",
                              "type":"item",
                              "value" : "897607_32771_1"
                          },
                          {
                              "name":"value",
                              "type":"int",
                              "value": 10
                          }
                      ]
                  },
                 {
                     "blockOptions": {
                         "method": {
                             "args": {
                                 "item": "item"
                             },
                             "name": "decreaseDimmer"
                         }
                     },
                     "blockType": "then",
                     "fields": [
                         {
                             "name": "item",
                             "type": "item",
                             "value": "897607_32771_1"                                                              
                         }
                     ]
                 }
             ],
             "when": [
                 {
                     "blockOptions": {                                                           
                         "method": {
                             "args": {
                                 "item": "item",
                                 "value": "value"
                             },
                             "name": "isItemState"
                         }
                     },
                     "blockType": "when",
                     "fields": [
                         {                                                               
                             "name": "item",
                             "type": "item",
                             "value": "897607_32770_1"                                                            
                         },
                         {
                             "name": "value",
                             "type": "bool",
                             "value": true
                         }
                     ]
                 }
             ]
         },
         "permission": {
             "devices": "s",
             "ezlo": "s",
             "rules": "s",
             "ui": "s",
             "users": "s"
         },
         "sender": "_USER_",
         "serial": "_HUB_ID_"
     }
}