[globalcache] Update the Item type for Contact Closures to "Switch" #5721
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current item type prevents globalcache contact closures from being modified by this module, since it is marked as an item type of "Contact" that can only accept "REFRESH" commands. So, while it can show changes that are done external to this module, all the functionality in the module that makes changes to the contact relays can never be triggered.
The documentation at https://www.openhab.org/addons/bindings/globalcache/ has examples that showcase both Switch and Contact item types. This change will make the Switch use cases actually work.
Today, this is shown in the log:
2019-06-12 22:39:05.386 [DEBUG] [.thing.internal.CommunicationManager] - Received event 'ON' (OnOffType) could not be converted to any type accepted by item 'HomeTheaterCurtainsOpen' (Switch) 2019-06-12 22:39:05.408 [DEBUG] [.thing.internal.CommunicationManager] - Received not accepted type 'OnOffType' for channel 'globalcache:itachCC:000C1E034EF7:cc-m1#c2'
Signed-off-by: Nick Hill knikhilwiz@gmail.com