From 97d07142d8c442dd54bf15e9d5473725d24f8883 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sat, 11 Mar 2023 01:16:34 -0500 Subject: [PATCH] Allow specifying include/exclude/filter options multiple times by appending --- check_home_assistant_state.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/check_home_assistant_state.py b/check_home_assistant_state.py index c468151..dee9df8 100755 --- a/check_home_assistant_state.py +++ b/check_home_assistant_state.py @@ -318,6 +318,7 @@ def main(): type=AttributeFilter.from_str, default=[], nargs="*", + action="extend", 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="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", ) common_args.add_argument( @@ -332,6 +334,7 @@ def main(): "--exclude", default=[], nargs="*", + action="extend", help="exclude entities by id", ) common_args.add_argument(