Initial Home Assistant observer
This commit is contained in:
commit
325917c09b
8 changed files with 624 additions and 0 deletions
22
run_ha_observer.sh
Executable file
22
run_ha_observer.sh
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
if [[ -f .env ]]; then
|
||||
set -a
|
||||
# shellcheck disable=SC1091
|
||||
source .env
|
||||
set +a
|
||||
else
|
||||
echo "Missing .env. Copy .env.example to .env and edit it." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -x .venv/bin/python ]]; then
|
||||
PYTHON=.venv/bin/python
|
||||
else
|
||||
PYTHON=python3
|
||||
fi
|
||||
|
||||
"$PYTHON" ha_observer.py "${1:-collect}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue