Files

23 lines
544 B
Bash
Executable File

#!/usr/bin/env bash
set -e
cd "$(dirname "$0")/.."
if [ ! -f "${PWD}/config/configuration.yaml" ]; then
mkdir -p "${PWD}/config"
hass --config "${PWD}/config" --script ensure_config
echo "Updating default configuration."
echo "
logger:
default: info
logs:
custom_components.garmin_connect: debug
" >> "${PWD}/config/configuration.yaml"
fi
# Set the python path to include our custom_components directory
export PYTHONPATH="${PYTHONPATH}:${PWD}/custom_components"
# Start Home Assistant
hass --config "${PWD}/config" --debug