WebRTC icon indicating copy to clipboard operation
WebRTC copied to clipboard

The PTZ controls are unresponsive when combined with Vertical or Horizontal stack cards.

Open sheminasalam opened this issue 3 years ago • 2 comments

Hi there, appreciate the good work but I tried to combine this card with some of my switches using a vertical stack card. The card shows the live feed but the PTZ controls doesn't work. The following is my config.

type: vertical-stack
cards:
  - type: custom:webrtc-camera
    url: >-
      rtsp://admin:[email protected]:554/cam/realmonitor?channel=9&subtype=1&unicast=true&proto=Onvif
    poster: https://home-assistant.io/images/cast/splash.png
    intersection: 0.75
    muted: false
    ui: true
    background: true
    ptz:
      service: onvif.ptz
      data_left:
        entity_id: camera.gate_ptz_cam
        pan: LEFT
      data_right:
        entity_id: camera.gate_ptz_cam
        pan: RIGHT
      data_up:
        entity_id: camera.gate_ptz_cam
        tilt: UP
      data_down:
        entity_id: camera.gate_ptz_cam
        tilt: DOWN
      data_zoom_in:
        entity_id: camera.gate_ptz_cam
        zoom: ZOOM_IN
      data_zoom_out:
        entity_id: camera.gate_ptz_cam
        zoom: ZOOM_OUT
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: toggle
        entity: light.robo_fan_speed
      - type: button
        tap_action:
          action: toggle
        entity: light.robo_fan_volume
      - type: button
        tap_action:
          action: toggle
        entity: light.robo_fan_control
      - type: button
        tap_action:
          action: toggle
        entity: light.robo_fan_tilt

sheminasalam avatar Jul 10 '21 11:07 sheminasalam

I'm facing the same problem when using in vertical-stack cards. Here is the log output:

image

Looks like "hass" object is undefined when the card is rendered inside another card

rikman122 avatar Jul 21 '21 18:07 rikman122

I think I'm running it the same bug. I've integrated the custom:webrtc-camera card into a custom:state-switch card. That way, plz control isn't shown at all.

Could it be possible to get this fixed? :)

baurmatt avatar Feb 12 '23 16:02 baurmatt