Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Add support for Valves #3

Open
jvmahon opened this issue Jan 6, 2024 · 8 comments
Open

Add support for Valves #3

jvmahon opened this issue Jan 6, 2024 · 8 comments

Comments

@jvmahon
Copy link

jvmahon commented Jan 6, 2024

Can a similar helper be made to invert the switch and show it as a valve?

In HomeAssistant 2024.1.0, a new valve type was added and it does not work propertly with Z-wave valves.

Z-wave valves are generally represented as a switch where "On" means "stop the flow".

The Valve helper can be added to the Z-wave valve "switch", but they have it backwards for valves - when the helper is added, the "On" value of the switch is mapping to "turn on the flow", so it needs to be inverted. That is , to work with Z-wave where a "on" means "stop flow", the switch On needs to map to "Valve Closed".

Thanks

@disforw
Copy link
Owner

disforw commented Jan 6, 2024

Instead of complicating it and getting into whether your wires should be flipped or not, how about we just create an inverse for valve?
More integrations are going to release a valve entity in the future.

@jvmahon
Copy link
Author

jvmahon commented Jan 6, 2024

I think it has to be "inverse switch and change it to a valve" - if that's what you mean, then yes, that would work. I am also checking with the person who added the "valve" type to switch_as_x and maybe this will get added directly into HomeAssistant's core integration. So maybe hold off a little bit and I'll see if I get a response to that.

@disforw
Copy link
Owner

disforw commented Jan 6, 2024

Here's the thing, I think you may be mistaken. I have a zwave valve, and it's working perfectly. Open is on, closed is off.

Right now my sprinkler valve is off/closed for the season
Screenshot_20240106-124547

@disforw
Copy link
Owner

disforw commented Jan 6, 2024

You may want to reverse the polarity of your valve wiring... It's wrong.

@disforw
Copy link
Owner

disforw commented Jan 6, 2024

OR use this to invert the switch, then change the inverted switch to a valve using switch_as_x

@jvmahon
Copy link
Author

jvmahon commented Jan 6, 2024

Interesting. And I think I figured out this may be because some valves don't properly identify their Z-WAVE Specific Class. Your device uses this to identify itself as a valve. Mine doesn't.

I checked the Z-wave device database at opensmarthouse.org. Your device, the LGZW water valve, shows up having a Generic Class of GENERIC_TYPE_SWITCH_BINARY And a Specific Class of "SPECIFIC_TYPE_VALVE_OPEN_CLOSE" https://opensmarthouse.org/zwavedatabase/1063

image

My device, a Fortrezz WV-01 shows up having a Generic Class of GENERIC_TYPE_SWITCH_BINARY but a Specific Class of "SPECIFIC_TYPE_NOT_USED" . https://opensmarthouse.org/zwavedatabase/368

image

So my assumption is that HomeAssistant knows that if the specific type is "SPECIFIC_TYPE_VALVE_OPEN_CLOSE" it knows what to do. Else, it gets it wrong.

@jvmahon
Copy link
Author

jvmahon commented Jan 6, 2024

OR use this to invert the switch, then change the inverted switch to a valve using switch_as_x

Yes, that seems to work. Thanks!

@disforw
Copy link
Owner

disforw commented Jan 6, 2024

Oh, well wait a second... That's pretty easy too, you can open a PR with Zwave-JS to change that!
https://github.com/zwave-js/node-zwave-js/blob/86b137ef54357e84fc7e50df8a558a7b2f540525/packages/config/config/devices/0x0084/wv-01.json#L4

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants