Add an example to detect doorbell button presses (#24740)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
rosetown-kelly 2022-11-18 06:33:39 -07:00 committed by GitHub
parent 1a0d7e250b
commit 9a2aa37609
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -424,4 +424,25 @@ amcrest:
- ptz_preset
```
## Example Automation to Detect Button Presses on AD110 and AD410 Doorbells
Using this trigger in an automation will allow you to detect the press of the doorbell call button and create automations based upon it.
```yaml
# Example automations.yaml entry
alias: Doorbell Pressed
description: "Trigger when Amcrest Button Press Event Fires"
trigger:
- platform: event
event_type: amcrest
event_data:
event: "CallNoAnswered"
payload:
action: "Start"
action:
- type: flash
entity_id: light.living_room
domain: light
```
To check if your Amcrest camera is supported/tested, visit the [supportability matrix](https://github.com/tchellomello/python-amcrest#supportability-matrix) link from the `python-amcrest` project.