diff --git a/source/_integrations/homekit.markdown b/source/_integrations/homekit.markdown index b0a80a081a2..b475894d556 100644 --- a/source/_integrations/homekit.markdown +++ b/source/_integrations/homekit.markdown @@ -460,6 +460,25 @@ automation: packet: XXXXXXXX ``` +## Events + +The HomeKit integration emits `homekit_state_change` events. These events can be used in automations to know when an entity's state was changed from HomeKit. + +```yaml +# Example for handling a HomeKit event +automation: + trigger: + - platform: event + event_type: homekit_state_change + event_data: + entity_id: cover.garage_door + service: open_cover + action: + - service: persistent_notification.create + data: + message: "The garage door got opened via HomeKit" +``` + ## Troubleshooting ### All or some devices are intermittently unresponsive