Skip to content

Commit 5ec37f3

Browse files
committed
Update README.md
Added door status sensor example
1 parent 5a70b8e commit 5ec37f3

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,23 @@ lock:
158158
message: "{{ trigger.event.data }}"
159159
```
160160

161+
#### Door status sensor example
162+
163+
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.
164+
165+
```yaml
166+
template:
167+
- trigger:
168+
- platform: event
169+
event_type: dahua_vto
170+
event_data:
171+
Code: DoorStatus
172+
binary_sensor:
173+
- name: VTO Door Status
174+
state: "{{ trigger.event.data.Data.Status | string == 'Open' }}"
175+
device_class: door
176+
```
177+
161178
# Commands and Events
162179

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

0 commit comments

Comments
 (0)