diff --git a/check_home_assistant_state.py b/check_home_assistant_state.py index 96ca580..62cb26e 100755 --- a/check_home_assistant_state.py +++ b/check_home_assistant_state.py @@ -137,6 +137,10 @@ class Icinga2ConfAction(argparse.Action): @nagiosplugin.guarded def main(): argp = argparse.ArgumentParser(description=__doc__) + + argp.add_argument("-v", "--verbose", action="count", default=0) + argp.add_argument("--make-icinga-conf", action=Icinga2ConfAction) + argp.add_argument( "-t", "--token", @@ -147,8 +151,6 @@ def main(): argp.add_argument( "-u", "--url", required=True, type=str, help="URL for Home Assistant" ) - argp.add_argument("-v", "--verbose", action="count", default=0) - argp.add_argument("--make-icinga-conf", action=Icinga2ConfAction) argp.add_argument( "-d", @@ -190,7 +192,7 @@ def main(): type=key_value, default=[], nargs="*", - help="filter by 'attribute=value'", + help="filter by 'attribute=value' (may be specified multiple times)", ) argp.add_argument( "--friendly",