-
-
Notifications
You must be signed in to change notification settings - Fork 32k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core 2024.1.0 - Valve Domain - Open / Closed are Inverted #107011
Comments
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) switch_as_x documentation |
There's no way to know if a switch which is used to control a valve is open when the switch is on, or the opposite. The same is true for switches which control covers and locks. I think we need an option in |
An invert function on the Switch type would be a great addition (for this and other purposes). As a longer-term solution, at least for Z-Wave products that were designed to be values it would be even better if the device would be added as a valve during pairing. Z-wave devices report both a generic type (i.e., Switch), as well as a specific type (VALVE_OPEN_CLOSE) - maybe that specific type information could be used during pairing. Another thought ...
In any case, its great to see this functionality being added (even if there are a few pieces like this that need to get worked out for it to reach its full potential). |
@emontnemery , FYI - I tried modifying the valve.py entry that you added to the switch_as_x integration to create an inverted switch as valve. I've attached that file. I couldn't figure out how to get this installed and working though (I tried adding the switch_as_x as a custom integration to override the built-in, but I'm still learning how to do that and I haven't gotten it to work). In any case, it seemed like a relatively simple update (changes were made to lines 42 and 53 (renaming the entity to ValveSwitchInverted for the inverted case) and 63, 73, 91 (inverting the on/off states). I'm not sure if much else is needed, but maybe this is a quick starting point, the idea would be to add this as a new named choice - e.g., "Invert On-Off Switch and Add as Valve" or "Zwave Valve Device Switch to Valve" or something like that. Better still might be a simple "Invert" toggle on the helper, but I wasn't sure if that was possible (or how to do it). |
The problem
This is for the Z-Wave water valve WV-01 by FortrezZ, LLC.
For Z-wave water valves, when they are represented as a Switch (pre-2024.1.0), the "On" position corresponds to the valve being shut, and the "Off" position corresponds to the valve being open.
Two issues:
For example, as you can see in the image below, the Original Switch entity (now Hidden) is in the Off position. For Z-Wave valves, this means that water is flowing and the valve is Open. However, the Helper, image below, shows the valve in the closed position and the Logbook also shows "Closed".
This issue carries through to the Valve:Open service. When Valve: Open is used in an automation, it closes the valve.
What version of Home Assistant Core has the issue?
2024.1.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
No response
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: