Go to file
2023-03-11 01:30:09 -05:00
check_home_assistant_state.py Bump version to 0.3.0 2023-03-11 01:28:19 -05:00
pyproject.toml Enable and apply Black formatting 2023-03-11 00:11:05 -05:00
README.md Bump required Python to 3.8 in README for argparse action="extend" 2023-03-11 01:30:09 -05:00

Check Home Assistant State

A check plugin for Nagios/Icinga/etc. that queries Home Assistant for the current state of entities.

Requirements

Usage

You will need a token for Home Assistant's REST API. Instructions to aquire one can be found here.

At a minimum, you need to specify the token, home assistant url, a device class to filter by, and warning/critical ranges. Example:

./check_home_assistant_state.py --token $HASS_TOKEN --url $HASS_URL --device-class battery --warning 20:100 --critical 10:100

See --help for more features/arguments.

A CheckCommand config for Icinga2 can be generated with --make-icinga-conf.