From f4f23796d5a9a436f6c076da9e81a213ad0b477b Mon Sep 17 00:00:00 2001 From: Pino Date: Thu, 11 Jun 2026 03:48:33 +0200 Subject: [PATCH] =?UTF-8?q?DOC-005:=20Quickstart=20ENV-Doku=20hinzuf=C3=BC?= =?UTF-8?q?gen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - .env.example mit SILLYHOME_HA_URL und SILLYHOME_HA_TOKEN - README: Quickstart-Sektion mit Installation, Start, ENV, Prüfung, Tests - Hinweis zu Secrets und .gitignore --- .env.example | 3 +++ README.md | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .env.example 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 + ```