2023-06-12 00:33:07 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
2025-06-15 21:31:51 -07:00
|
|
|
set -ex
|
2023-06-12 00:33:07 +02:00
|
|
|
|
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
|
|
|
|
|
|
# Create config dir if not present
|
|
|
|
|
if [[ ! -d "${PWD}/config" ]]; then
|
|
|
|
|
mkdir -p "${PWD}/config"
|
|
|
|
|
hass --config "${PWD}/config" --script ensure_config
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Set the path to custom_components
|
|
|
|
|
## This let's us have the structure we want <root>/custom_components/adaptive_lighting
|
|
|
|
|
## while at the same time have Home Assistant configuration inside <root>/config
|
|
|
|
|
## without resulting to symlinks.
|
|
|
|
|
export PYTHONPATH="${PYTHONPATH}:${PWD}/custom_components"
|
|
|
|
|
|
|
|
|
|
# Start Home Assistant
|
2026-01-13 11:32:17 +01:00
|
|
|
uv run hass --config "${PWD}/config" --debug
|