Allow specifying include/exclude/filter options multiple times by appending

This commit is contained in:
Adam Goldsmith 2023-03-11 01:16:34 -05:00
parent a0ad62c4f2
commit 00b8a37ae2

View File

@ -318,6 +318,7 @@ def main():
type=AttributeFilter.from_str,
default=[],
nargs="*",
action="append",
help="filter by 'attribute=value' (may be specified multiple times). Use != to negate the match",
)
common_args.add_argument(
@ -325,6 +326,7 @@ def main():
"--include",
default=[],
nargs="*",
action="append",
help="explicitly include entities by id. Other entities will not be considered if this is specified. Listed entities must also match the specified device class",
)
common_args.add_argument(
@ -332,6 +334,7 @@ def main():
"--exclude",
default=[],
nargs="*",
action="append",
help="exclude entities by id",
)
common_args.add_argument(