diff --git a/.gitignore b/.gitignore index 06263ce..94fa16c 100644 --- a/.gitignore +++ b/.gitignore @@ -13,16 +13,5 @@ coverage.xml # Home Assistant configuration -.cloud -.HA_VERSION -.storage -automations.yaml -blueprints -configuration.yaml -deps -home-assistant_v2* -home-assistant.log* -tts -scenes.yaml -scripts.yaml -secrets.yaml \ No newline at end of file +config/* +!config/configuration.yaml \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 797ded3..88f2fa7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,7 +53,7 @@ This custom component is based on [integration_blueprint template](https://githu It comes with development environment in a container, easy to launch if you use Visual Studio Code. With this container you will have a stand alone Home Assistant instance running and already configured with the included -[`configuration.yaml`](./configuration.yaml) +[`configuration.yaml`](./config/configuration.yaml) file. ## License diff --git a/configuration.yaml b/config/configuration.yaml similarity index 100% rename from configuration.yaml rename to config/configuration.yaml diff --git a/scripts/develop b/scripts/develop index 49de63b..89eda50 100755 --- a/scripts/develop +++ b/scripts/develop @@ -4,5 +4,17 @@ set -e 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 /custom_components/integration_blueprint +## while at the same time have Home Assistant configuration inside /config +## without resulting to symlinks. +export PYTHONPATH="${PYTHONPATH}:${PWD}/custom_components" + # Start Home Assistant -hass -c . --debug +hass --config "${PWD}/config" --debug