custom_components/omni_pca/ — drop-in HA integration: - manifest.json (HA 2026.x, iot_class=local_push, requires omni-pca lib) - config_flow.py — host/port/controller_key with auth + reauth steps, parse_controller_key() extracted as pure testable function - coordinator.py — OmniDataUpdateCoordinator with long-lived OmniClient, unsolicited push wiring, ConfigEntryAuthFailed on bad key, reconnect on err - binary_sensor.py — one entity per named zone, zone_type -> device_class map (OPENING/MOTION/SMOKE/etc), is_on derived from ZoneProperties.status - const.py, strings.json, translations/en.json, README.md - hacs.json at root for HACS distribution tests: 97 pass + 2 skip (HA harness not installed; importorskip in test_ha_imports.py). 12 cases for parse_controller_key validation. Ruff clean across src/ tests/ custom_components/. Status of HA component itself NOT validated against a running HA — needs that next.
33 lines
1.5 KiB
JSON
33 lines
1.5 KiB
JSON
{
|
|
"config": {
|
|
"step": {
|
|
"user": {
|
|
"title": "Connect to your Omni panel",
|
|
"description": "Enter the IP/hostname of your HAI/Leviton Omni Pro II controller and the 32-character hex Controller Key. Use `omni-pca decode-pca <file>.pca --field controller_key` to extract the key from a PC Access export.",
|
|
"data": {
|
|
"host": "Host",
|
|
"port": "Port",
|
|
"controller_key": "Controller Key (32 hex chars)"
|
|
}
|
|
},
|
|
"reauth_confirm": {
|
|
"title": "Re-enter Controller Key",
|
|
"description": "The panel at {host}:{port} rejected the saved key. Paste the new 32-character hex Controller Key.",
|
|
"data": {
|
|
"controller_key": "Controller Key (32 hex chars)"
|
|
}
|
|
}
|
|
},
|
|
"error": {
|
|
"cannot_connect": "Could not reach the panel. Check the host, port, and that TCP/4369 is open.",
|
|
"invalid_auth": "The Controller Key was rejected by the panel.",
|
|
"invalid_key": "Controller Key must be exactly 32 hexadecimal characters (16 bytes).",
|
|
"unknown": "An unexpected error occurred. Check the Home Assistant logs."
|
|
},
|
|
"abort": {
|
|
"already_configured": "This panel is already configured.",
|
|
"reauth_successful": "Re-authentication was successful."
|
|
}
|
|
}
|
|
}
|