1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-03 20:02:22 +01:00

Dump full parsed config to json-config api call (#4373)

This commit is contained in:
Jesse Hills
2023-02-01 16:59:51 +13:00
committed by GitHub
parent d4a8df04b8
commit e847766514
3 changed files with 30 additions and 14 deletions

View File

@@ -339,7 +339,7 @@ def command_config(args, config):
_LOGGER.info("Configuration is valid!")
if not CORE.verbose:
config = strip_default_ids(config)
safe_print(yaml_util.dump(config))
safe_print(yaml_util.dump(config, args.show_secrets))
return 0
@@ -665,6 +665,9 @@ def parse_args(argv):
parser_config.add_argument(
"configuration", help="Your YAML configuration file(s).", nargs="+"
)
parser_config.add_argument(
"--show-secrets", help="Show secrets in output.", action="store_true"
)
parser_compile = subparsers.add_parser(
"compile", help="Read the configuration and compile a program."