Station name as "brand, street, city", grey box on all editable fields

The "grey box around the icons" report turned out not to be a defect: the box
on "10.000 km"/"1 Jahr"/"15" is the wanted pattern, and every value the user
can change should carry it. All .feld inputs and selects now get the grey iOS
fill; inputs with their own visual language (checkbox/radio/range/file) keep
the transparent base rule, so the switches are unaffected.

Fuel stations are now displayed as "Shell, Pascalstr. 8, Ingolstadt" instead of
the bare operator name. New _marke()/_ist_strasse()/_tankstelle() helpers are
shared by both parser paths so Shell and non-Shell receipts format the same.
The brand is only matched against the receipt header - searching the whole text
would let "Total" hit a totals line. Missing parts are dropped instead of
leaving empty comma slots, and without a known brand the operator name takes
its place. station_address still carries the full street and postcode.
test_bekannte_stationen updated to the new format; suite stays green.

installationspaket/ is versioned from now on (user request). It contains no
real vehicle data - only the example profile with empty FIN/plate placeholders.
Keep it in sync whenever pyscript/ or www/ changes.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
2026-08-16 12:52:31 +02:00
co-authored by Claude Opus 5
parent 39da68cd87
commit fb38c297bd
49 changed files with 11131 additions and 27 deletions
@@ -0,0 +1,75 @@
# Kurzanleitung — Installation auf einer neuen Home-Assistant-Instanz
Alle Dateien, die dafür nötig sind, liegen schon in diesem Ordner. Ausführliche
Erklärungen, Troubleshooting und Hintergründe stehen in `../INSTALL.md` — hier
nur die Checkliste.
## Voraussetzungen
- HACS installiert, darüber **pyscript** installiert (HACS → Integrationen →
„pyscript" suchen → Download → HA neu starten)
## 1. Dateien kopieren
Ziel ist das `config`-Verzeichnis der neuen HA-Instanz, z. B. über das
Samba-Share-Add-on (`\\<HA-IP>\config`):
| Aus diesem Ordner | Nach |
|---|---|
| `pyscript\` | `\\<HA-IP>\config\pyscript\` |
| `data\` | `\\<HA-IP>\config\audi_dashboard\` (**umbenennen** von `data` zu `audi_dashboard`) |
| `www\` | `\\<HA-IP>\config\www\` |
In `audi_dashboard\` danach `fahrzeugprofil.example.json` zu
`fahrzeugprofil.json` umbenennen — die Platzhalter darin lassen sich nach dem
ersten Start direkt in der App unter **Einstellungen → Fahrzeug einrichten**
eintragen.
## 2. configuration.yaml ergänzen
Die beiden Blöcke aus `configuration_snippet.yaml` (`pyscript:` und
`panel_custom:`) in die bestehende `configuration.yaml` übernehmen — nicht
ersetzen. Falls dort schon `pyscript:` existiert, nur `allow_all_imports: true`
ergänzen.
## 3. Long-Lived Access Token
Profil-Avatar (unten links) → „Long-lived access tokens" → Token erstellen →
Wert in eine neue Datei `audi_dashboard\ha_token.txt` einfügen (nur der Token,
keine Anführungszeichen). Wird fürs Kilometerstand-Screening gebraucht.
## 4. Neu starten
**Einstellungen → System → Neu starten.**
## 5. Sensoren zuordnen
Nach dem Neustart sollte „Mein Audi" in der Sidebar erscheinen. Dort:
**Einstellungen → Fahrzeug einrichten → Einrichten → „Setup — Sensoren
zuordnen"**. Zwingend für die Fahrterkennung: der Zündungs-/ACC-Sensor
(`binary_sensor`, meist vom Teltonika FMM003). Alles Weitere ist optional —
ohne zugeordneten Sensor zeigt die App „unbekannt" statt eines Werts.
## 6. Optional: Beleg-Parser
Nur nötig, wenn Shell-Tankbelege hochgeladen werden sollen: im Terminal &
SSH-Add-on (oder `docker exec`) `pip install pypdf` ausführen.
## Künftige Updates
Nicht diesen Ordner erneut kopieren — stattdessen `..\update.ps1` aus dem
Hauptprojekt verwenden:
```powershell
..\update.ps1 -Ziel "\\<HA-IP-Adresse>\config"
```
Kopiert `pyscript\` und alle `www\`-Dateien (inkl. `audi-dashboard-ios.css`
und `badges\`, die früher hier im Skript fehlten), lässt `data\`/
`audi_dashboard\` unangetastet. pyscript lädt automatisch neu, fürs Frontend
reicht ein normales Neuladen der Seite (F5).
---
Details, Screenshots-Ersatz-Erklärungen und die vollständige
Troubleshooting-Tabelle: siehe `../INSTALL.md`.