Compare commits

..

4 Commits

2 changed files with 23 additions and 3 deletions

View File

@ -8,7 +8,11 @@ object CheckCommand "home_assistant_state" {
"--url" = { "--url" = {
value = "$home_assistant_state_url$" value = "$home_assistant_state_url$"
description = "URL for Home Assistant" description = "URL for Home Assistant"
} }
"--device-class" = {
value = "$home_assistant_state_device_class$"
description = "Device class of entities to monitor"
}
"--warning" = { "--warning" = {
value = "$home_assistant_state_warning$" value = "$home_assistant_state_warning$"
description = "Return warning if battery percentage is outside RANGE" description = "Return warning if battery percentage is outside RANGE"
@ -17,5 +21,21 @@ object CheckCommand "home_assistant_state" {
value = "$home_assistant_state_critical$" value = "$home_assistant_state_critical$"
description = "Return critical if battery percentage is outside RANGE" description = "Return critical if battery percentage is outside RANGE"
} }
"--min" = {
value = "$home_assistant_state_min$"
description = "Min for performance data"
}
"--max" = {
value = "$home_assistant_state_max$"
description = "Max for performance data"
}
"--attribute" = {
value = "$home_assistant_state_attribute$"
description = "Check attribute instead of value"
}
"--filter" = {
value = "$home_assistant_state_filter$"
description = "Filter by 'attribute=value' (can be an array)"
}
} }
} }

View File

@ -89,7 +89,7 @@ def main():
"--device-class", "--device-class",
type=str, type=str,
required=True, required=True,
help="A device class", help="Device class of entities to monitor",
) )
argp.add_argument( argp.add_argument(
"-w", "-w",