mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 15:08:10 +01:00
Add option for dashboard command to only generate the project and supporting files (#3981)
This commit is contained in:
parent
cc7cf73d59
commit
22f81475db
1 changed files with 5 additions and 1 deletions
|
@ -313,7 +313,11 @@ class EsphomeUploadHandler(EsphomeCommandWebSocket):
|
||||||
class EsphomeCompileHandler(EsphomeCommandWebSocket):
|
class EsphomeCompileHandler(EsphomeCommandWebSocket):
|
||||||
def build_command(self, json_message):
|
def build_command(self, json_message):
|
||||||
config_file = settings.rel_path(json_message["configuration"])
|
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):
|
class EsphomeValidateHandler(EsphomeCommandWebSocket):
|
||||||
|
|
Loading…
Reference in a new issue