Document that HomeKit emits an event (#21189)

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Pieter Rautenbach 2022-02-04 06:33:55 +02:00 committed by GitHub
parent 548a9ccd3b
commit b3f30fa3ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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