DOC-QUALITY-001: Quickstart, ENV-Doku und Tests beschreiben
This commit is contained in:
2
.env.example
Normal file
2
.env.example
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
SILLYHOME_HA_URL=http://homeassistant.local:8123
|
||||||
|
SILLYHOME_HA_TOKEN=REPLACE_ME_WITH_LONG_LIVED_TOKEN
|
||||||
38
README.md
38
README.md
@@ -12,3 +12,41 @@ TheSillyHome zeigte die Idee: statt statischer Regeln das Zuhause aus Verhaltens
|
|||||||
- Automationen vorschlagen und direkt generieren
|
- Automationen vorschlagen und direkt generieren
|
||||||
- Lokal-first ohne Cloudpflicht
|
- Lokal-first ohne Cloudpflicht
|
||||||
- Erweiterbar, testbar, dokumentiert
|
- Erweiterbar, testbar, dokumentiert
|
||||||
|
|
||||||
|
## APPENDIX
|
||||||
|
|
||||||
|
### Quickstart
|
||||||
|
1. Python-Venv anlegen und Abhängigkeiten installieren:
|
||||||
|
```bash
|
||||||
|
python -m venv .venv
|
||||||
|
source .venv/bin/activate
|
||||||
|
pip install -e .
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Konfiguration aus `.env.example` übernehmen und anpassen:
|
||||||
|
```bash
|
||||||
|
cp .env.example .env
|
||||||
|
```
|
||||||
|
|
||||||
|
3. API starten:
|
||||||
|
```bash
|
||||||
|
uvicorn app.main:app --reload
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Erreichbar unter:
|
||||||
|
- `http://127.0.0.1:8000/health` - Health-Check
|
||||||
|
- `http://127.0.0.1:8000/docs/` - OpenAPI-Dokumentation
|
||||||
|
- `http://127.0.0.1:8000/v1/entities` - Home-Assistant-Entities
|
||||||
|
|
||||||
|
### ENV-Konfiguration (`.env.example`)
|
||||||
|
- `SILLYHOME_HA_URL` – Basis-URL deiner Home-Assistant-Instanz (z. B. `http://homeassistant.local:8123`)
|
||||||
|
- `SILLYHOME_HA_TOKEN` – Long-Lived Access Token aus Home Assistant (nur lesen)
|
||||||
|
|
||||||
|
Hinweis: Nutze ausschließlich Long-Lived Access Tokens mit Leserechten. Niemals Administrator-Tokens oder Passwörter eintragen. `.env` gehört nicht in Versionskontrollsysteme.
|
||||||
|
|
||||||
|
### Tests
|
||||||
|
```bash
|
||||||
|
pytest -q
|
||||||
|
ruff check .
|
||||||
|
mypy app tests
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user