Update esphome/__main__.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Jesse Hills 2025-07-23 11:19:36 +12:00 committed by GitHub
parent 4321dfb885
commit 4bc7a6305f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1040,7 +1040,7 @@ def parse_args(argv):
argcomplete.autocomplete(parser)
if arguments and arguments[0] in SIMPLE_CONFIG_ACTIONS:
if len(arguments) > 0 and arguments[0] in SIMPLE_CONFIG_ACTIONS:
args, unknown_args = parser.parse_known_args(arguments)
if unknown_args:
_LOGGER.warning("Ignored unrecognized arguments: %s", unknown_args)