Allow specifying include/exclude/filter options multiple times by appending
This commit is contained in:
parent
a0ad62c4f2
commit
97d07142d8
@ -318,6 +318,7 @@ def main():
|
|||||||
type=AttributeFilter.from_str,
|
type=AttributeFilter.from_str,
|
||||||
default=[],
|
default=[],
|
||||||
nargs="*",
|
nargs="*",
|
||||||
|
action="extend",
|
||||||
help="filter by 'attribute=value' (may be specified multiple times). Use != to negate the match",
|
help="filter by 'attribute=value' (may be specified multiple times). Use != to negate the match",
|
||||||
)
|
)
|
||||||
common_args.add_argument(
|
common_args.add_argument(
|
||||||
@ -325,6 +326,7 @@ def main():
|
|||||||
"--include",
|
"--include",
|
||||||
default=[],
|
default=[],
|
||||||
nargs="*",
|
nargs="*",
|
||||||
|
action="extend",
|
||||||
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",
|
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(
|
common_args.add_argument(
|
||||||
@ -332,6 +334,7 @@ def main():
|
|||||||
"--exclude",
|
"--exclude",
|
||||||
default=[],
|
default=[],
|
||||||
nargs="*",
|
nargs="*",
|
||||||
|
action="extend",
|
||||||
help="exclude entities by id",
|
help="exclude entities by id",
|
||||||
)
|
)
|
||||||
common_args.add_argument(
|
common_args.add_argument(
|
||||||
|
Loading…
Reference in New Issue
Block a user