Three new pieces compose into an inline edit mode for the side panel:
E1 — omni_pca/programs/write websocket command:
Accepts a Program dict (mirrors the dataclass field by field) plus
a slot. Validates with a voluptuous schema (range checks on each
byte field, prog_type 0..10), constructs the typed Program, calls
client.download_program over the wire. Updates coordinator.data
.programs on success so the next list call reflects the edit
before the next poll catches up. Returns {slot, written: true} on
success; structured errors on validation / not_supported / write_failed.
E2 — omni_pca/objects/list:
Returns sorted {index, name} entries for zones / units / areas /
thermostats / buttons sourced from the coordinator's discovered
topology. Frontend caches the response client-side; the topology
doesn't change unless the user reloads the integration.
E3 — Frontend TIMED editor:
Detail panel grows an "Edit" button for TIMED+compact programs
(other types stay read-only with no button). Click reveals an
inline form with:
* Time row — hour / minute number inputs
* Days row — 7 toggle buttons (Mon..Sun) matching the bitmask
* Action row — Command dropdown (friendly verbs from the
COMMAND_OPTIONS table), object picker that auto-filters to
the right kind for the selected command (zone / unit / area /
button / none), and a Level % input for UNIT_LEVEL specifically
* Read-only inline-conditions notice for programs that carry
cond / cond2 (editing condition fields is a future cut)
Save sends the draft via programs/write; Cancel discards.
The poll timer pauses while editing so the form values don't
flicker mid-edit.
Scope honesty: this pass edits TIMED programs only. Other types
(EVENT / YEARLY / WHEN / AT / EVERY / REMARK) remain read-only
with Fire / Clone / Clear available. Inline AND-IF condition editing
is deferred — the conditions render as a banner. Creating new programs
uses Clone (already shipped) → edit the clone.
The _fetchProgramFields function currently seeds from defaults (6:00
weekdays, UNIT_ON to first unit) rather than pulling raw fields from
the panel because the get-detail websocket response carries rendered
tokens but not raw bytes. That's a TODO marked inline; for the
clone-then-edit workflow the defaults are fine, but editing existing
programs in place will need a tiny backend addition.
4 new HA-integration tests covering write happy path, overwrite,
invalid payload validation, and objects/list returns named buckets.
Full suite: 647 passed, 1 skipped (up from 643, 4 new tests).
Frontend bundle: 47 KB minified (up from 38 KB with editor + form code).
HAI / Leviton Omni Panel — Home Assistant Integration
Native HA integration that talks Omni-Link II directly to your Omni Pro II / Omni IIe / Omni LTe / Lumina controller over TCP. No middleware — HA opens an encrypted session straight to the panel and listens for unsolicited push messages.
This integration is the HA-facing wrapper around the
omni-pca Python library; the library
handles the wire protocol, this component surfaces it as HA entities.
Install
HACS
- HACS → Integrations → search HAI / Leviton Omni Panel.
- Install, then restart Home Assistant.
(If not yet in the HACS default catalog: HACS → Integrations → custom
repository → add https://github.com/rsp2k/omni-pca, category Integration.)
Manual
Copy the custom_components/omni_pca/ directory into your HA
config/custom_components/ directory and restart HA.
Configure
- Settings → Devices & Services → Add Integration → search for HAI/Leviton Omni Panel.
- Enter:
- Host — IP or hostname of the panel (e.g.
192.168.1.50) - Port — defaults to
4369(HAI's reserved port) - Controller Key — 32 hex characters, the panel's NVRAM key
- Host — IP or hostname of the panel (e.g.
- Save. The panel appears as a single device with entities per object.
Where do I get the Controller Key?
If you have a .pca configuration export from PC Access, the included CLI
extracts the key for you:
uvx omni-pca decode-pca '/path/to/My House.pca' --field controller_key
Otherwise, find it in PC Access under the panel's Setup → Misc → Network page (HAI labels it "Encryption Key 1").
Entities created
One device per panel, plus per-object entities below.
| Platform | Entity | Per |
|---|---|---|
alarm_control_panel |
Area arm/disarm with code | discovered area |
binary_sensor |
Zone open/tripped | binary zone |
binary_sensor |
Zone bypassed (diagnostic) | binary zone |
binary_sensor |
AC power, backup battery, system trouble | panel |
button |
Panel button macro | discovered button |
climate |
Thermostat (heat/cool/auto, fan, hold) | discovered thermostat |
event |
Typed push event relay | panel |
light |
Unit on/off + brightness | discovered unit |
sensor |
Analog zone (temp/humidity/power) | analog zone |
sensor |
Thermostat current temp / humidity / outdoor temp | thermostat |
sensor |
Panel model + firmware, last event class | panel |
switch |
Zone bypass toggle | binary zone |
State propagates via the panel's unsolicited push messages: zone changes, arming changes, AC/battery troubles, etc. all arrive within one TCP round- trip. A 30-second background poll backstops anything that didn't push.
Services
| Service | Purpose |
|---|---|
omni_pca.bypass_zone |
Bypass a zone by 1-based index |
omni_pca.restore_zone |
Restore a previously-bypassed zone |
omni_pca.execute_program |
Run a stored program by index |
omni_pca.show_message |
Display a stored message on consoles |
omni_pca.clear_message |
Clear a displayed message |
omni_pca.acknowledge_alerts |
Clear all outstanding troubles/alerts |
omni_pca.send_command |
Power-user escape hatch (raw Command opcode) |
Every service takes an entry_id so it picks the right panel when you have
multiple configured.
Automation example
React to any alarm activation in real time:
automation:
- alias: Notify on alarm
trigger:
- platform: event
event_type: state_changed
event_data:
entity_id: event.panel_events
condition: >
{{ trigger.event.data.new_state.attributes.event_type ==
"alarm_activated" }}
action:
- service: notify.mobile_app
data:
title: ALARM
message: >
Area {{ trigger.event.data.new_state.attributes.area_index }}
Diagnostics
Settings → Devices & Services → HAI/Leviton Omni Panel → ⋮ → Download diagnostics dumps a redacted snapshot (controller key removed, zone names hashed) — useful for bug reports.
Troubleshooting
- Won't connect: confirm port 4369 is open on the panel. The Omni Pro II's network module ships off by default; enable it under Setup → Misc → Network on a console.
- Authentication failed: re-check the Controller Key. The integration triggers HA's reauth flow when the panel rejects the key.
- No entities for X: only objects with a name configured on the panel are discovered. PC Access's "Names" page is where they live.
See the parent README for protocol /
library details. Detailed reverse-engineering notes are in
docs/JOURNEY.md.