Add set positions to baby monitor
This commit is contained in:
parent
ac0deff771
commit
be33beb72d
@ -19,7 +19,7 @@ elements:
|
||||
entity_id: {{ entity }}
|
||||
dir: left
|
||||
style:
|
||||
left: 10%
|
||||
left: 30px
|
||||
top: 50%
|
||||
color: yellow
|
||||
|
||||
@ -32,7 +32,7 @@ elements:
|
||||
entity_id: {{ entity }}
|
||||
dir: right
|
||||
style:
|
||||
left: 90%
|
||||
right: 6px
|
||||
top: 50%
|
||||
color: yellow
|
||||
|
||||
@ -46,7 +46,7 @@ elements:
|
||||
dir: up
|
||||
style:
|
||||
left: 50%
|
||||
top: 10%
|
||||
top: 30px
|
||||
color: yellow
|
||||
|
||||
- type: icon
|
||||
@ -59,5 +59,30 @@ elements:
|
||||
dir: down
|
||||
style:
|
||||
left: 50%
|
||||
top: 90%
|
||||
bottom: 6px
|
||||
color: yellow
|
||||
|
||||
- type: icon
|
||||
icon: mdi:numeric-1-box-outline
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: rest_command.camera_position
|
||||
service_data:
|
||||
entity_id: camera.barnrum
|
||||
position: 0
|
||||
style:
|
||||
left: 30px
|
||||
bottom: 0px
|
||||
color: blue
|
||||
- type: icon
|
||||
icon: mdi:numeric-2-box-outline
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: rest_command.camera_position
|
||||
service_data:
|
||||
entity_id: camera.barnrum
|
||||
position: 1
|
||||
style:
|
||||
left: 66px
|
||||
bottom: 0px
|
||||
color: green
|
||||
|
@ -10,6 +10,7 @@ homeassistant:
|
||||
<<: *common
|
||||
camera.barnrum:
|
||||
<<: *common
|
||||
host: !secret camera_barnrum_host
|
||||
|
||||
switch.barnrum_ptz_left:
|
||||
<<: *common
|
||||
@ -74,3 +75,9 @@ script:
|
||||
- service: camera.onvif_ptz
|
||||
data_template:
|
||||
entity_id: "{{ entity_id }}"
|
||||
|
||||
rest_command:
|
||||
camera_position:
|
||||
url: http://{{ state_attr(entity_id, 'host')}}/web/cgi-bin/hi3510/param.cgi?cmd=preset&-act=goto&-number={{ position }}
|
||||
username: !secret camera_barnrum_username
|
||||
password: !secret camera_barnrum_password
|
||||
|
Loading…
x
Reference in New Issue
Block a user