[homekit] extend support of flag "inverted" to other accessories #10212
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.
this PR adds support of "inverted" flag to further accessories. flag "inverted" swap the mapping from Switch and Contact states to corresponding states of HomeKit accessories. This could be useful as the states of physical devices are not always correspond to HomeKit accessories states, e.g
https://community.openhab.org/t/openhab-3-0-1-invert-locks-homekit/117093/9
https://community.openhab.org/t/homekit-contactsensor-inverted/117625/5
this flag was already available for few accessories like Lock or WindowCovering. this PR add it to all Switch and Contact accessories.
this PR does not change the existing behaviour as flag "inverted" is optional
Signed-off-by: Eugen Freiter freiter@gmx.de