TarheelGrad1998 / gallery-card

A custom card for Home Assistant that will display images and/or videos from a folder in the style of a gallery.
97 stars 30 forks source link

Image/Video tabs? #83

Closed peebles closed 6 months ago

peebles commented 6 months ago

I have a folder (and I am using "folder" integration for my sensor) called "history" that contains both .jpg files and .mp4 files. Using the gallery card with this sensor, I expected to see a "images" tab and a "videos" tab; go to images tab to see galler of images, video tab to see gallery of videos. But instead there are no tabs and images and videos are inter-mixed together.

I tried re-arranging my history folder into history/images and history/videos, but that didn't work, and I got "invalid date" as it seemingly tried to render the sub folders.

How do I get the "tab" behavior I was expecting?

TarheelGrad1998 commented 6 months ago

Yes, it doesn't have automatic image/video tab that you're looking for. You'd have to do that manually, by creating two folder entities, one for each folder and/or both pointing to the same folder with a filter specified for ".jpg" and ".mp4".

Once that's done you can create two tabs in your dashboard, each with a gallery card pointing to one of the sensors.

Hope this helps.

peebles commented 6 months ago

Ok, that makes sense. Thank you for the advice. The other thing I was just about to try was to see if, if the gallery config contained an array of entities, that each entity was displayed as a tab. Guess that wouldn't work either.

The documentation (README) contains an image with tabs. That was what made me think tabs were part of the UX.

TarheelGrad1998 commented 6 months ago

Sorry, the screenshot is a little old, but it's just using the tabs/views built in to Home Assistant.