Advertisement
dykandDK

HA - YAML - Lovelace ONVIF PTZ Camera

Dec 9th, 2020
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 4.14 KB | None | 0 0
  1.       #---------------------------------------------------------------
  2.       # CCTV with PTZ controls
  3.       #---------------------------------------------------------------
  4.       - type: picture-elements
  5.         entity: ca
  6.         camera_image: camera.my_onvif_stream
  7.         camera_view: live
  8.         elements:
  9.           - type: icon
  10.             icon: "mdi:arrow-up"
  11.             style:
  12.               background: "rgba(255, 255, 255, 0.5)"
  13.               right: 25px
  14.               bottom: 50px
  15.             tap_action:
  16.               action: call-service
  17.               service: onvif.ptz
  18.               service_data:
  19.                 tilt: UP
  20.                 entity_id: camera.my_onvif_stream
  21.                 move_mode: ContinuousMove
  22.                 continuous_duration: 1
  23.           - type: icon
  24.             icon: "mdi:arrow-down"
  25.             style:
  26.               background: "rgba(255, 255, 255, 0.5)"
  27.               right: 25px
  28.               bottom: 0px
  29.             tap_action:
  30.               action: call-service
  31.               service: onvif.ptz
  32.               service_data:
  33.                 tilt: DOWN
  34.                 entity_id: camera.my_onvif_stream
  35.                 move_mode: ContinuousMove
  36.                 continuous_duration: 1
  37.           - type: icon
  38.             icon: "mdi:arrow-left"
  39.             style:
  40.               background: "rgba(255, 255, 255, 0.5)"
  41.               right: 50px
  42.               bottom: 25px
  43.             tap_action:
  44.               action: call-service
  45.               service: onvif.ptz
  46.               service_data:
  47.                 pan: LEFT
  48.                 entity_id: camera.my_onvif_stream
  49.                 move_mode: ContinuousMove
  50.                 continuous_duration: 1
  51.           - type: icon
  52.             icon: "mdi:arrow-right"
  53.             style:
  54.               background: "rgba(255, 255, 255, 0.5)"
  55.               right: 0px
  56.               bottom: 25px
  57.             tap_action:
  58.               action: call-service
  59.               service: onvif.ptz
  60.               service_data:
  61.                 pan: RIGHT
  62.                 entity_id: camera.my_onvif_stream
  63.                 move_mode: ContinuousMove
  64.                 continuous_duration: 1
  65.           - type: icon
  66.             icon: "mdi:arrow-top-left"
  67.             style:
  68.               background: "rgba(255, 255, 255, 0.5)"
  69.               right: 50px
  70.               bottom: 50px
  71.             tap_action:
  72.               action: call-service
  73.               service: onvif.ptz
  74.               service_data:
  75.                 tilt: UP
  76.                 pan: LEFT
  77.                 entity_id: camera.my_onvif_stream
  78.                 move_mode: ContinuousMove
  79.                 continuous_duration: 1
  80.           - type: icon
  81.             icon: "mdi:arrow-top-right"
  82.             style:
  83.               background: "rgba(255, 255, 255, 0.5)"
  84.               right: 0px
  85.               bottom: 50px
  86.             tap_action:
  87.               action: call-service
  88.               service: onvif.ptz
  89.               service_data:
  90.                 tilt: UP
  91.                 pan: RIGHT
  92.                 entity_id: camera.my_onvif_stream
  93.                 move_mode: ContinuousMove
  94.                 continuous_duration: 1
  95.           - type: icon
  96.             icon: "mdi:arrow-bottom-left"
  97.             style:
  98.               background: "rgba(255, 255, 255, 0.5)"
  99.               right: 50px
  100.               bottom: 0px
  101.             tap_action:
  102.               action: call-service
  103.               service: onvif.ptz
  104.               service_data:
  105.                 tilt: DOWN
  106.                 pan: LEFT
  107.                 entity_id: camera.my_onvif_stream
  108.                 move_mode: ContinuousMove
  109.                 continuous_duration: 1
  110.           - type: icon
  111.             icon: "mdi:arrow-bottom-right"
  112.             style:
  113.               background: "rgba(255, 255, 255, 0.5)"
  114.               right: 0px
  115.               bottom: 0px
  116.             tap_action:
  117.               action: call-service
  118.               service: onvif.ptz
  119.               service_data:
  120.                 tilt: DOWN
  121.                 pan: RIGHT
  122.                 entity_id: camera.my_onvif_stream
  123.                 move_mode: ContinuousMove
  124.                 continuous_duration: 1
  125.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement