Repository navigation
Add full native support in zha for the Valve entity (device type exposed in Home Assistant)? #528
Description
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).
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Size
Area
Activity
Hedda commentedon Feb 21, 2026
@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?
Add basic siren #665
Remove non-ZCL siren select entities for basic sirens #666
Add quirks v2 siren entity based on
SwitchMetadata#667Add quirks v2 siren entity based on
ZCLEnumMetadata#668Also see related PR:
As well as these related device handler requests:
Hedda commentedon Mar 9, 2026
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
OnOffandLevelControl 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:
Add valve to switch_as_x domains home-assistant/frontend#19118
Allow inverting switch_as_x cover, lock, valve home-assistant/frontend#19324
Improve mock for cover, alarm, lock, lawn mower, valve and vacuum home-assistant/frontend#29999
Add valve open/close card feature home-assistant/frontend#26488
Valve favorites home-assistant/frontend#30190
Demo valve registry entry and device home-assistant/core#165803
Add valve conditions home-assistant/core#166634
Add is_closed state attribute to valve home-assistant/core#165227
Add
valve.openedandvalve.closedtriggers home-assistant/core#165160Add opening/closing state icons to valve domain home-assistant/core#169644
Valve favorites home-assistant/frontend#30190
Allow for decimals in cover and valve favorites home-assistant/frontend#51633
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!
DeeJaWue commentedon Apr 9, 2026
Hi @Hedda ,
thanks for your work on the valve platform! I hope it will be available soon, because I also have the Sonoff SWV.
RcandLegos commentedon May 11, 2026
Thanks@Hedda,
Having valve support would greatly improve the user experience for my zigbee water valve.
Hedda commentedon May 13, 2026
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 SWV-ZF2 Hydro Series Hydro DUO with two valves and Flow Meters:
Sonoff SWV-ZF Hydro Series Hydro ONE with one valve and a Flow Meter:
Sonoff SWV-ZN Hydro Series Hydro Lite without Flow Meter:
Note! Models come with different fittings: NH for North America (National Hose) and BSP (British Standard Pipe) for Europe.
Sonoff claims it is compatible with Home Assistant's ZHA but the zha-quirk in ZHA Device Handlers still needs further development:
Add support for SONOFF SWV1C and SWV2C water valves zha-device-handlers#4993
Add Sonoff SWV-ZFE smart water valve zha-device-handlers#4927
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:
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.