Skip to content

Commit

Permalink
[globalcache] Update the Item type for Contact Closures to "Switch" (o…
Browse files Browse the repository at this point in the history
…penhab#5721)

* Update the Item type for Contact Closures to Switch

The "Contact" item type cannot actually accept commands, so move it to a Switch. The documentation (https://www.openhab.org/addons/bindings/globalcache/) refers to defining these as both Contact and Switch types, but a Contact type is not very useful if you want to change the state of a relay.

Signed-off-by: Maximilian Hess <mail@ne0h.de>
  • Loading branch information
knikhilwiz authored and ne0h committed Sep 15, 2019
1 parent e5b6ac9 commit 3781ace
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bundles/org.openhab.binding.globalcache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ A *Contact Closure channel* activates the contact closure (relay) on the iTach o
For example, the following item links to the module 1, connector 1 channel on an iTach CC device.

```
Contact MyRelay "My Relay [%s]" (gRelays) { channel="globalcache:itachCC:000C1E039BCF:cc-m1#c1" }
Switch MyRelay "My Relay [%s]" (gRelays) { channel="globalcache:itachCC:000C1E039BCF:cc-m1#c1" }
```

The item definition for an iTach Flex WiFi device would look like this.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</channel-type>

<channel-type id="channel-type-cc">
<item-type>Contact</item-type>
<item-type>Switch</item-type>
<label>Contact Closure</label>
<description>Transmits contact closure command on module:connector</description>
</channel-type>
Expand Down

0 comments on commit 3781ace

Please sign in to comment.