Open jvmahon opened 6 months ago
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.
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.
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
You may want to reverse the polarity of your valve wiring... It's wrong.
OR use this to invert the switch, then change the inverted switch to a valve using switch_as_x
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
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
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.
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!
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
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