|  Developer
Updated on November 24, 2022

hub.modes.switch

  • Version: 1.0
  • Classes: UI
  • Title: House modes
  • Description: Switch to mode. If the another mode is in the process of being switched to, cancel the previous transition. The transition is not initiated if the mode is already in the process of being switched to. After the transition, bypass devices list is cleared for the previous house mode.
Edit
Field Type Required Description
modeId string Id of the new mode
name string Name the new mode

name and modeId are optional but one of them is required.

Edit
Field Type Required Description
switchToDelay integer + Delay (sec) before switch to the mod
Edit
Edit
call by id:
				
					{
    "method": "hub.modes.switch",
    "id": "_ID_",
    "params": {
        "modeId": "<modeId>"
    }
}				
			
call by name:
				
					{
    "method": "hub.modes.switch",
    "id": "_ID_",
    "params": {
        "name": "<existingModeName>"
    }
}				
			
Edit
				
					{
    "error": null,
    "id": "_ID_",
    "result": {
        "switchToDelay": 0,
        "alarmDelay": 0
    }
}				
			
Edit
Code Message Data Description
-32602 Wrong params rpc.params.invalid Trying to switch to already selected house mode by id
-32602 Wrong params rpc.params.invalid Trying to switch to already selected house mode by name
-32602 The house mode with this id does not exist ezlo.house_mode.not.exist
-32602 The house mode with this name does not exist ezlo.house_mode.name.not.exist