Skip to content

Add full native support in zha for the Valve entity (device type exposed in Home Assistant)? #528

Description

@Hedda

Could you add zha application platform support for valve entity as native device type in Home Assistant for valve devices? See:

and

Update: Sounds as if this upstream Home Assistant core could also need a device class for "timed open" to the valve entity. See discussion:

This native Valve entity device type expose valves as more than a switch to show a valve in different states (Open, Opening, Closed, Closing, Stopped, Unavailable, Unknown, and current valve position), with device class for water, gas, or none.

It it primarly intended to replace switch/cover entities used today for these type devices as workaround, providing a dedicated entity type for controlling fluid/gas valves (water, gas, irrigation), not only allowing for states like open, closed, opening, and closing, but also supports partial opening (set_valve_position) for percent control, so that a valve state does not always need to be open or close (like a switch is always either ON or OFF) but can also optionally expose opening percentage in the device preferences, (however that is one one of the key difference between non-Zigbee valves is that some non-Zigbee devices have a better ways of exposing Valve open percent control).

Anyway, currently the Valve entity looks to only be supported in the zha integration as an extension of the switch or cover entiry as an such is not presented in Home Assistant as a "Valve" entiry but instead as a switch or cover entiry.

(The workarounds that users are using now because this is missing in ZHA is to change the entity type from swich to valve in the entity settings or use the "Change device type of a switch" helper integration).

The native Valve entity device type was introduced as a new new entity type in Home Assistant 2024.1 (January 2024) release:

Initially this new Valves so far support the following device classes:

  • None: Generic valve. This is the default and doesn’t need to be set.
  • water: Valve that controls the flow of water through a system.
  • gas: Valve that controls the flow of gas through a system.

Ideally, we want to combine this with ZHA device handlers to present correct device type of each product model in Home Assistant to know if something that today just expse a switch should instead in the future really be exposes as a valve in ZHA. As relevant to the the roadmap work on the upcoming improving experience when add device class to a new device via a device database:

As an proof-of-concept and code example see Matter Valve:

Another one with more features/functionality is the MQTT Valve (which is part of the mqtt component in Home Assistant code):

Yet another integration with the Valve entiry is SmartThings:

Update: And also Shelly too now:

Currently, many other integrations also have native support valves and now provides a valve entity (which also means that the valve entities also work with Home Assistant Voice, Amazon Alexa, and Google Home).

Many new existing new products include valves for pools, sprinkler systems, garden watering, and main water lines, or house gas valves.

Most are just generic shut off valves products that that simply expose either state and position or just on and off via a switch, but quickly looking through list of other water shutoff valves on Z2M supported devices it seems some expose it differently:

Then that "valve" device type will compliment the other device types entities that the ZHA integration already supports as application platforms within Home Assistant, i.e.:

  • Alarm control panel
  • Binary sensor
  • Button
  • Climate (beta)
  • Cover
  • Device tracker
  • Fan
  • Light
  • Lock
  • Number
  • Select
  • Sensor
  • Siren
  • Switch
  • Update

PS: Off-topic here, but FYI, for reference, noted that there are a few others as well that are starting to ask for a new device type component for "irrigation system" as well in Home Assistant as that is a new device type now supported by the Matter standard and the HomeKit specification, (i.e. an additional new device type that is specifically used to control a group of irrigation zones for watering landscapes with multi-zone sprinklers or gardening beds, with the main difference that a single "irrigation system" device will have several device entities for zones which are sub-components the main device, but do not act as a hub managing multiple separate devices).

Activity

  1. Hedda commented on Feb 21, 2026

    @Hedda
    Author

    @TheJulianJES will you consider adding adding "valve" to EntityPlatform in zigpy and add quirks v2 valve entity to zha based on SwitchMetadata/ZCLEnumMetadata similar to your new PRs that add siren entiry to also try fufill this request to add basic valve device support for Zigbee devices?

    Also see related PR:

    As well as these related device handler requests:

  2. Hedda commented on Mar 9, 2026

    @Hedda
    Author

    FYI, puddly has a opened a draft for adding an initial base valve platform with basic support to zha here:

    • Add support for the Valve platform #673

      "This is a bit of a strange platform because the ZCL R8 spec does not actually support valves in any way. There are no clusters, there are no device types, nothing. So this functionality is again provided by an entity class relying on the existence of OnOff + (optional) LevelControl, accessible at the moment only with YAML platform overrides. It is a lower priority than the generic Switch entity and thus will never be discovered by default. This will be available for quirks to use in the near future."

    • Base valve platform #909

      "As with the other new platforms, this is only an abstract base. Device support will need to be implemented in https://github.com/zigpy/zha-device-handlers/. The ZCL spec doesn't have a concept of valves (only OnOff and LevelControl clusters without a distinguishing device type) so this platform cannot participate in ZCL discovery."

    • Add ZHA valve platform home-assistant/core#183740

      "Add the valve platform to ZHA. This is exposed internally by ZHA and with this change, will be exposed externally to Home Assistant."

    For reference, of interest, be aware of these indirectly related PRs for Home Assistant’s core adding frontend, triggers and conditions:

    All in all these show that valve as an entiry domain and device type platform is now already a first-class citizen in Home Assistant!

  3. DeeJaWue commented on Apr 9, 2026

    @DeeJaWue

    Hi @Hedda ,
    thanks for your work on the valve platform! I hope it will be available soon, because I also have the Sonoff SWV.

  4. RcandLegos commented on May 11, 2026

    @RcandLegos

    Thanks@Hedda,
    Having valve support would greatly improve the user experience for my zigbee water valve.

  5. Hedda commented on May 13, 2026

    @Hedda
    Author

    Tip if someone wants to test this summer is to check out the new SONOFF SWV-ZF2 Hydro Series Hydro Series Zigbee Smart Water Valves which has one or two valves and is designed to hook up to a tap outdoor for a garden hose to sprinklers or DIY irrigation.

    Links and info:

    Sonoff claims it is compatible with Home Assistant's ZHA but the zha-quirk in ZHA Device Handlers still needs further development:

    Official documentation is avalable here but does not cover any details on Zigbee clusters or attributes and such:

    CNX Software has a nice writeup which covers use cases and features/functions exposed when used with Sonoff's own gateways and controlled with the eWelink app:

    Image

    Also be aware Sonoff still sell their older model(s) of Zigbee Smart Water Valves without Flow Meter (but with "Flow Detection"):

    Again note that the each Zigbee ID ships as two different models with different fittings, NH or BSP, for North America and Europe.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    Priority

    None yet

    Size

    None yet

    Area

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions