WebRTC
WebRTC copied to clipboard
The PTZ controls are unresponsive when combined with Vertical or Horizontal stack cards.
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
I'm facing the same problem when using in vertical-stack cards. Here is the log output:
Looks like "hass" object is undefined when the card is rendered inside another card
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? :)