I have a water shutoff valve that shows as a switch device. I'm trying to use a custom mirror to have a virtual valve (so the dashboard looks right) set the state of the switch. Toggling the valve doesn't change the switch at all. Any suggestions?
It says your source attribute for the valve is using the values on and off. The virtual valve uses open and closed.
Edit: I tried this with a virtual valve and it will not even show me the valve. Probably because of this: "Forward any of the following events [switch, level, hue, saturation, colorTemperature, levelChange] from this device:"
I would just make an automation that when switch turns on, virtual valve opens, and when switch turns off, virtual valve closes. Also the reverse rule for the other direction.
Not me, @mike.maxwell
If that mapping isn’t there I’ll add it
There's a virtual hybrid driver (hybrid combines a switch with another Capability) for a Valve:
I think I understand what's going on the source driver has both switch and valve correct?
If so custom mirror perhaps is favoring switch over valve when selecting the source mappings, or some other confusion.
If that's the case I can run some tests,

The actual result seems correct.
https://groovy-lang.org/style-guide.html#_getters_and_setters
Getters and Setters ![]()
Yes, I'm using the built-in virtual valve driver.
Yup, actually a bug in the mapping mappings data structure, will be fixed in the upcoming 2.4.1 release
Great. Thanks for the help.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
