From 22f81475dbf8e02e590a733ff77a7acc73c24cb6 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Thu, 10 Nov 2022 09:42:03 +1300 Subject: [PATCH] Add option for dashboard command to only generate the project and supporting files (#3981) --- esphome/dashboard/dashboard.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/esphome/dashboard/dashboard.py b/esphome/dashboard/dashboard.py index d551c9da4b..b7c24f9e2e 100644 --- a/esphome/dashboard/dashboard.py +++ b/esphome/dashboard/dashboard.py @@ -313,7 +313,11 @@ class EsphomeUploadHandler(EsphomeCommandWebSocket): class EsphomeCompileHandler(EsphomeCommandWebSocket): def build_command(self, json_message): config_file = settings.rel_path(json_message["configuration"]) - return ["esphome", "--dashboard", "compile", config_file] + command = ["esphome", "--dashboard", "compile"] + if json_message.get("only_generate", False): + command.append("--only-generate") + command.append(config_file) + return command class EsphomeValidateHandler(EsphomeCommandWebSocket):