I'm having a dedicated dashboard for a camera.
It only has two cards right now:
- A button to toggle a smart plug in which the camera is plugged in -> start / shutdown the camera
- A picture-entity card that shows the stream of the camera
I added a visibility condition to the camera feed that it is only visible when the smart plug is not off.
However, when I power on the camera it takes some time until the camera is ready to provide a video feed, but HA is much faster in showing the element and in trying to show the WebRTC stream.
The result: I am getting either an error "failed to start WebRTC stream" or a broken image placeholder.
Now, when I switch for a second to a different dashboard and then back, it works, but obviously, this is annoying.
How can I work around this? Can I add a delay when the picture-entity is shown? Can I add some kind of "re-try after x seconds" to the picture-entity? Can I add a second button that reloads the picture-entity? I am open for any suggestion that eliminates this little switch back and forth.
Thanks in advance! ![]()
The entity-card:
show_state: false
show_name: false
camera_view: live
fit_mode: cover
type: picture-entity
entity: camera.name_redacted_mediaprofile_channel1_mainstream
show_entity_picture: false
camera_image: camera.name_redacted_mediaprofile_channel1_mainstream
grid_options:
columns: full
rows: auto
visibility:
- condition: state
entity: switch.smart_plug_name_redacted
state_not: "off"