Picture card to show larger image in dialog on tap

Hi,

Been playing around with HA for a while now, and have most things setup. One thing that has been bugging me is showing snapshots on my LoveLace UI. While they show fine in a picture card, I would like the image to open in a larger dialog when I tap (much like my cameras do when using the picture-entity card).

Has anyone done anything like this?

Currently all I have is:

           - type: picture
              image: /local/pictures/detected_front_drive.jpg

Any help appreciated.

You can also set your image as a camera source…

camera:

  - platform: generic
    still_image_url: /local/pictures/detected_front_drive.jpg

Then you could create another picture-entity card just like you already have for your existing cameras.

Thanks Jason, this worked perfectly.

As a quick note, you need to specify the entire URL to your jpg, e.g:

Configuration.yaml

  - platform: generic
    name: Detected Front Drive
    still_image_url: http://xxx.duckdns.org:1234/local/pictures/detected_front_drive.jpg

ui-lovelace.yaml

            - type: picture-entity
              show_name: false
              show_state: false
              entity: camera.detected_front_drive   
1 Like

Great post as this got me to the solution I was looking for.

Just to add for whomever gets here: For me it also worked without having to make the image available on http (didn’t want this as it exposed it to the world)

In configuration.yaml

camera:
  - platform: local_file
    file_path: "/config/tmpfiles/still.jpg"
    name: still