diff --git a/devcontainer.json b/devcontainer.json new file mode 100644 index 0000000..dad50ca --- /dev/null +++ b/devcontainer.json @@ -0,0 +1,19 @@ +{ + "name": "HA Thermia Water Heater Integration", + "image": "mcr.microsoft.com/devcontainers/python:1-3.12", + "postCreateCommand": "./scripts/setup.sh", + "remoteUser": "vscode", + "customizations": { + "vscode": { + "settings": { + "python.pythonPath": "/usr/local/bin/python" + }, + "extensions": [ + "GitHub.copilot", + "github.vscode-pull-request-github", + "ms-python.python", + "ms-python.vscode-pylance" + ] + } + } +} diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..0b7e81a --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +homeassistant==2024.4.1 +ThermiaOnlineAPI==5.0.0 diff --git a/scripts/setup.sh b/scripts/setup.sh new file mode 100755 index 0000000..c325f9a --- /dev/null +++ b/scripts/setup.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -e + +cd "$(dirname "$0")/.." + +# Install dependencies + +install_packages() { + python -m pip \ + install \ + --upgrade \ + --disable-pip-version-check \ + "${@}" +} + +install_packages "pip<23.2,>=21.3.1" +install_packages setuptools wheel +install_packages -r requirements.txt