robertklep / name.klep.homekitty

HomeyKit 3.0
15 stars 5 forks source link

[Feature Request] Prevent button being published to HomeKit #103

Closed bursacmilan closed 3 months ago

bursacmilan commented 3 months ago

Type (brand/model) of device

Aqara Door and Window Sensor P2

Homey Model

Is it supported by HomeyKit?

Device Classes

Find the device here: https://tools.developer.homey.app/tools/devices

What are it's class, and virtual class (if it has one)?

Device Capabilities


I'm referencing this issue: https://github.com/robertklep/name.klep.homekitty/issues/97#issuecomment-2308100175

I'm using the new Aqara P2 Door Sensor, connected via Matter with my HomeyPro (without using any app). While it generally works well, I'm encountering a problem in HomeKit where two devices appear:

  1. Contact Sensor — This is the functionality I need.
  2. Switch — This seems unnecessary. When I toggle the switch, the P2 sensor is removed from my Matter network, requiring a re-pairing process.

After investigating the device's capabilities, I found it has two main functions:

This explains why a switch appears in HomeKit and why the device gets removed when the switch is activated. Is there a way to prevent the switch from being published to HomeKit?

robertklep commented 3 months ago

Oh geez, someone (at Athom I presume) has thought it would be a good idea to give Matter devices a button capability that, when pressed, removes the device from Homey 🤦🏼‍♂️

I'll try and see if I can easily filter away these capabilities so they don't get published to iOS.

robertklep commented 3 months ago

Should be fixed in v2.2.18, the current test version.

bursacmilan commented 3 months ago

Yes, I don’t understand why they implemented that either! 😄 Thanks for the fix!

robertklep commented 3 months ago

@bursacmilan can you try the current latest test version (v2.3.0)? It uses a different way of determining which capabilities should be mapped, and it should prevent any special capabilities from being exposed to iOS.

bursacmilan commented 3 months ago

@robertklep I tested the version, and it works perfectly. I'm now only seeing the sensor, and the switch has been removed. Thanks a lot!