|  Developer
Updated on May 16, 2022

scripts/modify_device

  • Manually modify some device fields
Edit
Field Type Required Description
device_id string + device ID to modify
device table + format of table is described in core.modify_device command.
Edit

Edit
Edit
				
					{
    "method": "extensions.plugin.run",
    "id": "_ID_",
    "params": {
        "script": "HUB:test_plugin/scripts/modify_device",
        "scriptParams": {
            "device_id": "5f16acb446aaf03ea2095e03",
            "device": {
                "name": "TestSwitchNew",
                "category": "switch",
                "subcategory": "interior_plugin",
                "type": "switch.outlet",
                "device_type_id": "test",
                "battery_powered": false
            }
        }
    }
}				
			
Edit
				
					{
    "error": null,
    "id": "_ID_",
    "result": {}
}