Skip to content

Commit

Permalink
[TASK] change dev env to fix serveral problems
Browse files Browse the repository at this point in the history
  • Loading branch information
KartoffelToby committed Sep 19, 2023
1 parent 524888d commit 1780ebd
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -e

cd "$(dirname "$0")/.."

python3 -m pip install --requirement requirements.dev.txt
20 changes: 20 additions & 0 deletions scripts/start
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

set -e

cd "$(dirname "$0")/.."

# Create config dir if not present
if [[ ! -d "${PWD}/.haconfig" ]]; then
mkdir -p "${PWD}/.haconfig"
hass --config "${PWD}/.haconfig" --script ensure_config
fi

# Set the path to custom_components
## This let's us have the structure we want <root>/custom_components/integration_blueprint
## 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}/.haconfig" --debug
11 changes: 11 additions & 0 deletions scripts/sync
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

set -e

cd "$(dirname "$0")/.."

echo "Syncing configuration.yaml"

cp -f .devcontainer/configuration.yaml ${PWD}/.haconfig/configuration.yaml

echo "Done. Restart Home Assistant to see changes."
9 changes: 9 additions & 0 deletions scripts/upgrade-dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -e

cd "$(dirname "$0")/.."

python3 -m pip install homeassistant

echo "Done."
13 changes: 13 additions & 0 deletions scripts/upgrade-version
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -e

read -p "What HA Version? " VERSION
echo "Installing ${my_var}!"


cd "$(dirname "$0")/.."

python3 -m pip install homeassistant==$VERSION

echo "Done."

0 comments on commit 1780ebd

Please sign in to comment.