Skip to content

Add Home Assistant valve domain support (open/close) - #42

Merged
FlyingDiver merged 1 commit into
FlyingDiver:masterfrom
hamwi875:add-valve-domain-support
Sep 14, 2026
Merged

FlyingDiver merged 1 commit into
FlyingDiver:masterfrom
hamwi875:add-valve-domain-support

Conversation

@hamwi875

Copy link
Copy Markdown

Hi Joe — thanks for the plugin, we use it heavily.

Problem

Home Assistant valve-domain entities (smart shutoff valves — Phyn, Moen Flo, Zooz, etc.) currently import only as read-only ha_generic devices: their state (is_closed / open) is visible, but there's no way to open/close the valve from Indigo. There's no valve control path, and no valve handler.

Change

Adds a first-class Home Assistant Valve (ha_valve) relay device that maps Indigo Turn On → valve.open_valve and Turn Off → valve.close_valve, mirroring the existing cover implementation (a valve is structurally a cover: open/close/stop/set_position). Purely additive — nothing else changes.

  • ValveEntityFeature flags + capability detection (SET_POSITION, STOP) in deviceStartComm/entity_update
  • ha_valve relay device type (Devices.xml) with a valve-filtered entity picker
  • entity_update state mapping → onOffState (on = open, off = closed), open/closed images — same as cover
  • actionControlDimmerRelay open/close handling for ha_valve
  • 'valve' added to the generic entity-type exclusion list so valve entities get the dedicated type

Scope

This wires open/close (Indigo relay on/off), which covers the primary shutoff use case. set_valve_position / stop_valve (for SET_POSITION/STOP valves) are scaffolded (feature flags + capability props) but not yet exposed as actions — happy to add a valve_actions block mirroring cover_actions if you'd like it in this PR.

Testing

py_compile (3.13) + Devices.xml parse clean. Validated against a live Phyn Plus shutoff (valve.phyn_fairfield_shutoff_valve, supported_features: 3 = open|close): imports as a Home Assistant Valve, reflects open/closed state, and Turn On/Off drives the physical valve (confirmed end-to-end, including from a control page).

Backward compatibility

Additive only — a new device type plus branches keyed on ha_valve. Existing ha_generic-imported valves keep working; users can optionally recreate them as ha_valve for control.

Happy to adjust naming or add the position/stop actions — thanks for considering it.

HA valve-domain entities (e.g. Phyn/Moen/Zooz shutoff valves) previously
imported only as read-only ha_generic devices — state was visible but the
valve could not be opened/closed from Indigo. This adds a first-class
'Home Assistant Valve' (ha_valve) relay device that maps Indigo Turn On ->
valve.open_valve and Turn Off -> valve.close_valve, mirroring the existing
cover implementation.

- ValveEntityFeature flags + capability detection (SET_POSITION/STOP)
- ha_valve relay device type with a valve-filtered entity picker
- entity_update state mapping (onOffState from open/closed)
- actionControlDimmerRelay open/close handling
- exclude 'valve' from the generic entity-type picker

Co-Authored-By: Claude <noreply@anthropic.com>
@FlyingDiver

Copy link
Copy Markdown
Owner

I won't be able to merge and publish until next week.

@FlyingDiver
FlyingDiver merged commit c55e289 into FlyingDiver:master Sep 14, 2026
1 check passed
@FlyingDiver

Copy link
Copy Markdown
Owner

Released in 2026.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants