Homekit :: ContactSensor :: Inverted

Hi OpenHab,

Could we please consider the same change as it was done for Lock accessory here ([OpenHab 3.0.1] - Invert Locks - HomeKit) for ContactSensor type as well.

I have dry contacts which indicate open/closed and in this case ON (True) indicates that item is closed and OFF (False) that item is opened.

Unfortunately was not able to configure it properly. OH latest stable v3

Thanks

You can use a MAP transform profile or similar to do the inversion at the channel<->Itemlink.

Yep, I tried with

{... homekit="ContactSensor" [ON="closed", OFF="open"], ..}

However item disappears from the list :frowning:

Thanks

Thatā€™s not a profile, but I was forgetting that Homekit does not use channels, so it was a useless suggestion anyway.

just checked in the code and unfortunately homekit addon does not support ā€œinvertedā€ flag and custom mapping for ContactSensor. it has basically no configuration.

but inverted flag could be indeed pretty useful. i will add it

here we go. added flag inverted to all accessories that can be linked to a switch or contact

1 Like

@yfre Itā€™s just awesome what you do for the openhab / HomeKit community.
Thank you :pray:

Thanks @yfre highly highly appreciated!!!

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.