Expose button to HomeKit

Hi,

I’m looking for the simplest way to trigger HomeKit scenes from Home Assistant.

I have KNX in my home and would like to trigger HomeKit scenes, ideally in this manner:

I have listening for knx_events set up that run automations, that could turn on and then turn off dummy switches exposed to HomeKit and then set up automations in HomeKit to run scenes there when the dummy switches are turned on. A push button entity like Thinka does it would be much more elegant though.

Any way to set it up in that way? Or any other way with fewer automation/switch entities?

I found this topic but I think it answers a different question:

Thanks

Hi :wave:!
Unfortunately HA button entities can not be triggered from outside of HA (eg. from KNX) - they are one-way.

You could however take a shortcut for your current solution by configuring Knx switches to trigger the HK scenes instead of using knx_event and dummy switches. In the HK scene you can then add to turn that exact switch off - so you also have a feedback for successfuly triggering the scene - since the siwtch should get OFF state from HK immediately after being turned ON from outside.

Maybe there are even better solutions to that problem - like creating an input_button helper and triggering that from KNX - but not sure if that works and it would require an automation again.

Hi farmio,

thanks for you reply that does indeed save on entities.

I just tested adding device triggers. It creates a button entity in HomeKit but it’s currently linked to the physical devices I have. Is there a way to create one using a template? By making a binary_sensor like this into a device that can be added as a device trigger?

I don’t think templates can be added to HA devices. But on device triggers I’m really a novice, sorry 🤷.