diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..17358b1d --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,20 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Python Debugger: Current File", + "type": "debugpy", + "request": "launch", + "program": "/usr/local/python/current/bin/hass", + "args": [ + "--config", + "config", + "--debug" + ], + "console": "integratedTerminal" + } + ] +} \ No newline at end of file diff --git a/scripts/setup.sh b/scripts/setup.sh index 141d19f9..692cc8b7 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -5,3 +5,9 @@ set -e cd "$(dirname "$0")/.." python3 -m pip install --requirement requirements.txt + +# Create config dir if not present +if [[ ! -d "${PWD}/config" ]]; then + mkdir -p "${PWD}/config" + hass --config "${PWD}/config" --script ensure_config +fi \ No newline at end of file