Add cameras

This commit is contained in:
2018-12-25 23:54:59 +01:00
parent 990571f4ed
commit 7a5308c502
2 changed files with 107 additions and 0 deletions

20
packages/camera_ptz.yaml Normal file
View File

@@ -0,0 +1,20 @@
homeassistant:
customize:
script.camera_ptz:
package: "camera_ptz"
script:
camera_ptz:
sequence:
- service: camera.onvif_ptz
data_template:
entity_id: "{{ entity_id }}"
pan: >
{{ {"left":"LEFT", "right":"RIGHT", "up":"NONE", "down":"NONE"}[dir] }}
tilt: >
{{ {"left":"NONE", "right":"NONE", "up":"UP", "down":"DOWN"}[dir] }}
- delay:
milliseconds: 100
- service: camera.onvif_ptz
data_template:
entity_id: "{{ entity_id }}"