From 2cc9fcc977d8b952b29340e11dbb7bc64af57caf Mon Sep 17 00:00:00 2001 From: Luke Date: Sun, 21 May 2023 15:29:33 -0400 Subject: [PATCH] Add scaffolds to vscode tasks (#92015) --- .vscode/tasks.json | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index c484045530d..c767647f821 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -137,6 +137,26 @@ "kind": "build", "isDefault": true } + }, + { + "label": "Run scaffold", + "detail": "Add new functionality to a integration using a scaffold.", + "type": "shell", + "command": "python3 -m script.scaffold ${input:scaffoldName} --integration ${input:integrationName}", + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Create new integration", + "detail": "Use the scaffold to create a new integration.", + "type": "shell", + "command": "python3 -m script.scaffold integration", + "group": { + "kind": "build", + "isDefault": true + } } ], "inputs": [ @@ -144,6 +164,23 @@ "id": "integrationName", "type": "promptString", "description": "For which integration should the task run?" + }, + { + "id": "scaffoldName", + "type": "pickString", + "options": [ + "backup", + "config_flow", + "config_flow_discovery", + "config_flow_helper", + "config_flow_oauth2", + "device_action", + "device_condition", + "device_trigger", + "reproduce_state", + "significant_change" + ], + "description": "Which scaffold should be run?" } ] }