custom-cards / surveillance-card

A custom component for displaying camera feeds in the style of a surveillance system.
Apache License 2.0
244 stars 36 forks source link

Enable live stream of selected camera #42

Closed tfili closed 3 years ago

tfili commented 3 years ago

If you have the HA stream integration enabled, then cameras that support it can live stream to Lovelace cards. In the picture-elements, picture-glance and picture-entity cards, you can simply specify camera_view: "live" in the configuration to enable this.

This change adds the camera_view option to the surveillance card. The ha-camera-stream component handles all the harder parts, so this change mainly hooks up the option and renders the ha-camera-stream component instead of the img for the selected camera if streaming is enabled.

I have Nest cameras and it seems to work pretty well with them.

This is my first time messing around with lovelace cards and I have limited LitElement experience so let me know if there is anything you want tweaked.

I also updated the README.

niemyjski commented 3 years ago

Thanks for the pr