mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 23:18:10 +01:00
Allow manually specifying binary file to OTA (#4054)
This commit is contained in:
parent
555bba7698
commit
b089a4ea80
1 changed files with 6 additions and 0 deletions
|
@ -298,6 +298,8 @@ def upload_program(config, args, host):
|
||||||
ota_conf = config[CONF_OTA]
|
ota_conf = config[CONF_OTA]
|
||||||
remote_port = ota_conf[CONF_PORT]
|
remote_port = ota_conf[CONF_PORT]
|
||||||
password = ota_conf.get(CONF_PASSWORD, "")
|
password = ota_conf.get(CONF_PASSWORD, "")
|
||||||
|
if args.file is not None:
|
||||||
|
return espota2.run_ota(host, remote_port, password, args.file)
|
||||||
return espota2.run_ota(host, remote_port, password, CORE.firmware_bin)
|
return espota2.run_ota(host, remote_port, password, CORE.firmware_bin)
|
||||||
|
|
||||||
|
|
||||||
|
@ -687,6 +689,10 @@ def parse_args(argv):
|
||||||
"--device",
|
"--device",
|
||||||
help="Manually specify the serial port/address to use, for example /dev/ttyUSB0.",
|
help="Manually specify the serial port/address to use, for example /dev/ttyUSB0.",
|
||||||
)
|
)
|
||||||
|
parser_upload.add_argument(
|
||||||
|
"--file",
|
||||||
|
help="Manually specify the binary file to upload.",
|
||||||
|
)
|
||||||
|
|
||||||
parser_logs = subparsers.add_parser(
|
parser_logs = subparsers.add_parser(
|
||||||
"logs",
|
"logs",
|
||||||
|
|
Loading…
Reference in a new issue