From 1a242f94db4923b099496497ba6e98b5f72e745d Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Wed, 12 Jun 2024 21:20:46 +1200 Subject: [PATCH] [host] Execute host program when using run command (#6897) --- esphome/__main__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/esphome/__main__.py b/esphome/__main__.py index f3c4ff3e23..5ff1a28ec7 100644 --- a/esphome/__main__.py +++ b/esphome/__main__.py @@ -488,6 +488,15 @@ def command_run(args, config): if exit_code != 0: return exit_code _LOGGER.info("Successfully compiled program.") + if CORE.is_host: + from esphome.platformio_api import get_idedata + + idedata = get_idedata(config) + if idedata is None: + return 1 + program_path = idedata.raw["prog_path"] + return run_external_process(program_path) + port = choose_upload_log_host( default=args.device, check_default=None,