Hi!
In the past, I was using custom:webrtc-camera in combination with custom:button-card, in order to have a special manual button to refresh the camera stream and it was working perfectly, but from the last updates (dunno which one), it is not working anymore… This is the card:
type: custom:button-card
custom_fields:
data:
card:
type: custom:webrtc-camera
url: |
[[[
return "rtsp://admin:[email protected]:554/h264Preview_01_sub#" + states['number.dummy_random_door_camera'].state;
]]]
muted: true
mode: mse
media: video,audio
ui: true
click:
card:
type: custom:button-card
icon: mdi:refresh
size: 20px
tap_action:
action: call-service
service: homeassistant.update_entity
service_data:
entity_id: number.dummy_random_door_camera
styles:
grid:
- grid-template-areas: "'data' 'click'"
- grid-template-columns: 1fr
I have removed the extra styles to have a smaller code for this post.
The “click” button was acting as randomizing the number value state of number.dummy_random_door_camera and the stream was refreshing…
Anyone knows an alternative to this or a solution?
Thanks!