integrate heating rule fix and quality workflow
Some checks failed
Quality / test (push) Has been cancelled
Some checks failed
Quality / test (push) Has been cancelled
This commit is contained in:
50
README.md
50
README.md
@@ -12,3 +12,53 @@ TheSillyHome zeigte die Idee: statt statischer Regeln das Zuhause aus Verhaltens
|
||||
- Automationen vorschlagen und direkt generieren
|
||||
- Lokal-first ohne Cloudpflicht
|
||||
- Erweiterbar, testbar, dokumentiert
|
||||
|
||||
## Lokaler Quickstart
|
||||
|
||||
Voraussetzung ist Python 3.11 oder neuer.
|
||||
|
||||
```bash
|
||||
python -m venv .venv
|
||||
. .venv/bin/activate
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install -e ".[dev]"
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
In `.env` müssen für echte Home-Assistant-Daten diese Werte gesetzt werden:
|
||||
|
||||
```bash
|
||||
SILLYHOME_HA_URL=http://homeassistant.local:8123
|
||||
SILLYHOME_HA_TOKEN=<long-lived-access-token>
|
||||
```
|
||||
|
||||
Alternativ werden aus Kompatibilitätsgründen auch `HA_URL` und `HA_TOKEN` gelesen.
|
||||
Tokens bleiben lokal und dürfen nicht committed, geloggt oder in Issues kopiert werden.
|
||||
|
||||
API starten:
|
||||
|
||||
```bash
|
||||
uvicorn app.main:app --reload
|
||||
```
|
||||
|
||||
Nützliche Checks:
|
||||
|
||||
```bash
|
||||
curl http://127.0.0.1:8000/health
|
||||
curl http://127.0.0.1:8000/v1/entities
|
||||
```
|
||||
|
||||
Die interaktive API-Dokumentation liegt unter `http://127.0.0.1:8000/docs`.
|
||||
|
||||
## Qualität
|
||||
|
||||
Vor jedem Pull Request lokal laufen lassen:
|
||||
|
||||
```bash
|
||||
pytest -q
|
||||
ruff check .
|
||||
mypy app tests
|
||||
```
|
||||
|
||||
Der Gitea-Actions-Workflow in `.gitea/workflows/quality.yml` führt dieselben Checks für
|
||||
Pushes und Pull Requests aus.
|
||||
|
||||
Reference in New Issue
Block a user