Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Added door status sensor example
  • Loading branch information
myhomeiot committed Nov 30, 2021
1 parent 5a70b8e commit 5ec37f3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,23 @@ lock:
message: "{{ trigger.event.data }}"
```

#### Door status sensor example

Thanks to [@mate](https://community.home-assistant.io/u/mate) for this example. [Here](https://community.home-assistant.io/t/dahua-vto-custom-integration/293693/116) you can also find door open/close events examples received from Dahua VTO.

```yaml
template:
- trigger:
- platform: event
event_type: dahua_vto
event_data:
Code: DoorStatus
binary_sensor:
- name: VTO Door Status
state: "{{ trigger.event.data.Data.Status | string == 'Open' }}"
device_class: door
```

# Commands and Events

You can send any command using the service `dahua_vto.send_command` or `dahua_vto.send_instance_command` and receive reply as event.
Expand Down

0 comments on commit 5ec37f3

Please sign in to comment.