diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..d033d17 --- /dev/null +++ b/.env.example @@ -0,0 +1,3 @@ +# Home Assistant Zugriff +SILLYHOME_HA_URL=http://localhost:8123 +SILLYHOME_HA_TOKEN=dein_long_lived_access_token \ No newline at end of file diff --git a/README.md b/README.md index e983512..b57e109 100644 --- a/README.md +++ b/README.md @@ -12,3 +12,34 @@ TheSillyHome zeigte die Idee: statt statischer Regeln das Zuhause aus Verhaltens - Automationen vorschlagen und direkt generieren - Lokal-first ohne Cloudpflicht - Erweiterbar, testbar, dokumentiert + +## Quickstart (lokaler Betrieb) + +1. **Voraussetzungen** + - Python 3.11+ + - Home Assistant mit REST-API erreichbar + - `pip install -e .[dev]` + +2. **Umgebungsvariablen** (`.env` im Projektroot) + ``` + SILLYHOME_HA_URL=http://localhost:8123 + SILLYHOME_HA_TOKEN=dein_long_lived_access_token + ``` + Tipp: `.env.example` kopieren und anpassen. Tokens niemals committen! + +3. **Server starten** + ``` + uvicorn app.main:app --reload + ``` + +4. **Prüfen** + - OpenAPI-Docs: http://localhost:8000/docs + - Health: http://localhost:8000/health + - Entities: http://localhost:8000/v1/entities (benötigt gültige HA-Konfiguration) + +5. **Tests** + ``` + pytest -q + ruff check . + mypy app tests + ```