mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 00:18:11 +01:00
Add `--version
` handler to cli (#7150)
This commit is contained in:
parent
39c0019534
commit
adfec578cf
1 changed files with 8 additions and 1 deletions
|
@ -747,7 +747,14 @@ def parse_args(argv):
|
|||
)
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description=f"ESPHome v{const.__version__}", parents=[options_parser]
|
||||
description=f"ESPHome {const.__version__}", parents=[options_parser]
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--version",
|
||||
action="version",
|
||||
version=f"Version: {const.__version__}",
|
||||
help="Print the ESPHome version and exit.",
|
||||
)
|
||||
|
||||
mqtt_options = argparse.ArgumentParser(add_help=False)
|
||||
|
|
Loading…
Reference in a new issue