Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image filenames are very long and dont display well #65

Open
craggyh opened this issue Jul 22, 2022 · 3 comments
Open

Image filenames are very long and dont display well #65

craggyh opened this issue Jul 22, 2022 · 3 comments

Comments

@craggyh
Copy link

craggyh commented Jul 22, 2022

Can the filenames generated be customized?
I just need the format to be shorter to display neatly in my gallery browser card but the generated filename is something like platerecognizer_driveway_cam_jpg_2022-07-22_10-04-48 which is really long and messes us how things are displayed with text for thumbnails overlaying on top of each other etc.

@craggyh
Copy link
Author

craggyh commented Jul 22, 2022

I actually found a workaround - custom gallery card- https://github.com/TarheelGrad1998/gallery-card.
Use the caption option to convert "platerecognizer_driveway_cam_jpg_2022-07-22_10-04-48" to display as just "07/22 10:04 AM"

@robmarkcole robmarkcole changed the title Image filenames Image filenames are very long and dont display well Jul 22, 2022
@Calimerorulez
Copy link

I actually found a workaround - custom gallery card- https://github.com/TarheelGrad1998/gallery-card. Use the caption option to convert "platerecognizer_driveway_cam_jpg_2022-07-22_10-04-48" to display as just "07/22 10:04 AM"

Hi @craigueh

Could you please share the yaml of the card you created with me? I'm having the same 'problem'.
Thank you in advance.

@craggyh
Copy link
Author

craggyh commented Jul 26, 2022

Here you go:

  • theme: Backend-selected
    title: Vehicles
    path: vehicles
    type: sidebar
    badges: []
    cards:
    • type: custom:gallery-card
      entities:
      • media-source://media_source/media/
        menu_alignment: bottom
        maximum_files: '10'
        caption_format: '%d/%m %H:%M %p'
        file_name_format: platerecognizer_driveway_cam_jpg_%YYY-%m-%d_%H-%M-%S
        show_reload: true
    • type: vertical-stack
      cards:
      • type: entity
        entity: image_processing.platerecognizer_driveway_cam_jpg
        attribute: last_detection
        name: Last Detection
      • type: entity
        entity: image_processing.platerecognizer_driveway_cam_jpg
        attribute: vehicles
        name: Detected Plate
      • type: entity
        entity: image_processing.platerecognizer_driveway_cam_jpg
        attribute: watched_plates
        name: Watched Plates
      • type: entity
        entity: image_processing.platerecognizer_driveway_cam_jpg
        attribute: statistics
        name: Statistics
        view_layout:
        position: sidebar

I still have one issue with the _latest image not being parsed correctly. I don't know how to get around it. If I could disable the "latest" image being added each time a vehicle is detected that would also solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants