Help with making a camera history card/view

Hello! I have Unifi cameras that I’ve added with both the Unifi Protect integration and I also have them in Frigate and have added them via Frigate as well. I also have the advanced camera card installed.

Basically want I’m looking to do is have a card on the dashboard with a live view of the camera and then tapping on it takes me to a scrubbable history with a live view that I can see looking back in time - a plus would show detection snapshots as well.

Is this possible to build at all? Heck at this point I might even settle for just deep linking to the Protect app on the specific camera if possible but I’d like to stay within Home Assistant if at all possible.

Let me know if there are any questions or if I can clarify anything. Thanks!

Probably, a camera history view may be already implemented in some custom card (do not know which one).
Otherwise you will have to create it on your own.

In general, a history of changes of some entity which has an “entity_picture” dynamically defined (like that “camera” entity) is possible with a custom logbook-card:

    type: custom:logbook-card
    entity: binary_sensor.testing_logbook_sensor_with_image
    history: 1   # in days

Here you can see a list of states (“on/off”) with an “entity_picture” (instead of an icon) since this entity (“binary_sensor.testing_logbook_sensor_with_image”) has an “entity_picture” defined - and it is dynamically changing (mimicing some camera/media_player/etc entity) dependently on a state (“on” = orange picture, “off” - blue picture).

Note that a stock logbook card will not show proper "entity_picture"s, only the CURRENT one:


although info about “entity_picture” is available in DB for EVERY change.
Consider this as a strange limitation of the stock logbook card.

So, using the custom logbook-card will help.
But there is another difficulty: for “camera” & “media_player” entities, values of “entity_picture” looks like “/api/camera_proxy/camera.xyz?token=92d647ae85ff3511b7f1aca5784”.
These paths are stored in DB - but I very doubt that right NOW you can access a yesterday’s image with a yesterday’s path. Means - the history of images is useless for these entities.

One of possible workarounds - you will have to save (in some automation) every image (snapshot) in some directory and then watch it in some custom card - there are cards (do not recall their names) which allow to see an image gallery in some directory (along with showing names/dates/etc).