feat: erste Fassung der ninstrip-Integration fuer Home Assistant

Auf dem Geruest von ha-ninlight aufgebaut und bewusst parallel gehalten:
gleiche Fehlerklassen in api.py, gleicher Coordinator mit Sperre und
Fehlertoleranz, gleicher Einrichtungsablauf samt Zeroconf und Reauth.

Eigenes Repo statt Erweiterung von ha-ninlight: die Geraete melden sich unter
verschiedenen mDNS-Diensten, das Datenmodell unterscheidet sich deutlich
(Segmente und Szenen gegen ein einzelnes Licht), und ha-ninlight laeuft
produktiv mit vier Lampen - Verzweigungen dort haetten beide Produkte
gefaehrdet.

Entitaeten: light (Hauptschalter und Helligkeit), select (Szene), button
(Neustart), vier Diagnosesensoren.

In ha-dev eingebunden und am echten Geraet geprueft: Aus- und Einschalten,
Helligkeit 40 Prozent, Szenenwechsel auf Regenbogen - das Geraet meldet
jeweils genau das zurueck.
This commit is contained in:
ninharp
2026-09-20 03:42:42 +02:00
commit adec66a6a2
16 changed files with 1140 additions and 0 deletions
@@ -0,0 +1,88 @@
{
"config": {
"step": {
"user": {
"title": "Add ninstrip",
"description": "Host and API token of the device. The token is printed once on the serial console at first boot; a factory reset creates a new one.",
"data": {
"host": "Host",
"token": "API token"
}
},
"discovery_confirm": {
"title": "ninstrip found",
"description": "{name} at {host}. Please enter the API token.",
"data": {
"token": "API token"
}
},
"reauth_confirm": {
"title": "Renew token",
"description": "The device at {host} rejects the stored token. After a factory reset it has a new one.",
"data": {
"token": "API token"
}
}
},
"error": {
"cannot_connect": "Device unreachable",
"invalid_auth": "Token rejected",
"not_ninstrip": "No ninstrip answering there",
"unknown": "Unexpected error"
},
"abort": {
"already_configured": "This device is already configured",
"reauth_successful": "Token renewed"
}
},
"options": {
"step": {
"init": {
"title": "Settings",
"data": {
"scan_interval": "Polling interval (seconds)"
}
}
}
},
"entity": {
"select": {
"preset": {
"name": "Scene"
}
},
"button": {
"restart": {
"name": "Restart"
}
},
"sensor": {
"rssi": {
"name": "Wi-Fi signal"
},
"uptime": {
"name": "Uptime"
},
"free_heap": {
"name": "Free memory"
},
"power_scale": {
"name": "Power limiting"
}
}
},
"exceptions": {
"auth_failed": {
"message": "The device rejected the token."
},
"device_busy": {
"message": "The device is busy - an update is probably running."
},
"request_failed": {
"message": "The device rejected the request: {message}"
},
"cannot_connect": {
"message": "The device is unreachable."
}
}
}