mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-08 09:56:52 +00:00
Document that HomeKit emits an event (#21189)
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
parent
548a9ccd3b
commit
b3f30fa3ec
@ -460,6 +460,25 @@ automation:
|
|||||||
packet: XXXXXXXX
|
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
|
## Troubleshooting
|
||||||
|
|
||||||
### All or some devices are intermittently unresponsive
|
### All or some devices are intermittently unresponsive
|
||||||
|
Loading…
x
Reference in New Issue
Block a user