Moisture Sensor to trigger outlet? -Help needed

Good question:

  1. Ideally the Valve shows up as “capability.valve” instead of “capability.switch”.

  2. The actions to be taken are then wet → “close() or shut()”, dry → “open()”; with perhaps some extra logic to determine if it is safe to "open()" the valve arbitrarily.

  3. If the Valve is still reading as “capability.switch”, then I presume "off()" means Shut, and “on()” means Open.


For more detail than you care to read: