mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-30 05:13:40 +00:00
26 lines
694 B
Bash
Executable file
26 lines
694 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# script/develop: Start Home Assistant in development mode
|
|
|
|
set -e
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
if [ -z "$VIRTUAL_ENV" ]; then
|
|
. "$HOME/.venv/bin/activate"
|
|
fi
|
|
|
|
# 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/tibber_prices
|
|
## 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
|
|
hass --config "${PWD}/config" --debug
|