I recently updated to HA 2022.6.5. The files custom component used to include attributes path, filter, number of file, bytes, fileList, sort, unit_of_measurement, icon and friendly_name. After updating to 2022.6.5 the sensor entities only include unit_of_measurement, icon and friendly_name. So the gallery card no longer shows any images. Any chance there is a fix somewhere for the files custom component that fixes this issue? I’ve tried using the platform folders but it doesn’t provide a means to sort the cards. My image file names look like this “person-06-13-22-18:39:45.jpg” where person can be person, car, dog or some other type of object.
- sensor
- platform: files
folder: /config/www/images
name: gallery_images
sort: date
Novice problem. I’m having trouble adding this to configuration.yaml. Is this exactly how it should be added?
I changed to:
sensor:
- platform: files
folder: /config/www/images
name: gallery_images
sort: date
I could save then but get this error when I restart.
The system cannot restart because the configuration is not valid: Platform error sensor.files - Integration ‘files’ not found.
You probably need to restart between putting the files component in your file structure and adding the sensor, so that HA knows the integration exists.
Thanks for your help!
Follow the steps here under Installation:
Restart HA between steps 3 and 4.
I have the same issue with stealing focus, is it possible to to disable? Thanks
Hi all, I have this configuration in configuration.yaml:
sensor:
- platform: files
folder: /home/homeassistant/.homeassistant/www/campanello
filter: '**/*.png'
name: immagini_campanello
sort: date
recursive: True
The folder is in this position: /home/homeassistant/.homeassistant/www/campanello
This is the conf of the card:
type: custom:gallery-card
entities:
- sensor.immagini_campanello
But the result is: no images or videos to display
What could I check?
Hi @drax , I think you just have to comment out the line I refer to here
The problem is just that when you update next time the problem will come back
Thank you for this integration. It provided exactly what I needed to show camera snapshots. I have come across one anomaly when taking advantage of the folder sensor as a source. The files shown in the gallery aren’t the latest version even after a reload and separate refresh of the sensor.
I capture a timestamped file and a file called Porch_latest.jpg
. If I trigger a snapshot then Porch_latest.jpg
is updated. I also have a static display of the latest snapshot which works fine and updates immediately based on this camera:
camera:
- platform: local_file
name: "Porch_camera"
file_path: /config/www/cam_capture/Porch_Latest.jpg
However the results of the folder sensor are strange even when I force a refresh.
sensor:
- platform: folder
folder: /config/www/cam_capture
In this example the image on the left is driven off the entity Porch_camera
which picks up /config/www/cam_capture/Porch_Latest.jpg
. This changes as soon as I trigger a snapshot. The gallery card on the right does update if I manually trigger a refresh of the folder sensor but picks up an old version of Porch_Latest.jpg
. In fact I deleted all the files in the folder, capture a new snapshot and this old version still displayed.
The gallery card config is:
type: custom:gallery-card
entities:
- sensor.cam_capture
title: Porch snapshot
menu_alignment: Responsive
show_reload: true
As ever with HA I feel like I am missing something obvious.
Tom
Sounds like something with the browser cache. Does it still show the old one if you use a different browser, or clear your browser cache?
I wouldn’t sweat that…if/when I can ever get an update out, this will definitely be fixed. Well, I’ll try anyway.
Thanks - I switched browsers/PC and it correctly shows the latest set of images. Much appreciated,
Tom
Now when I have you here - is it possible to make it so that we can swipe/press next image when its opened in a modal/window ?
Hi David,
I played around some more with the folder component as a source couldn’t get it to display the updated version of a file; even refreshing the web cache didn’t always work. This is only where I am capturing a snapshot to the same filename Porch_latest.jpg
.
So, I switched to using a media source and the updates are instant with changes to the Porch_latest.jpg
are reflected correctly.
For others who are learning HA like me and benefit from working examples:
configuration.yaml to setup the media source
media_dirs:
snapshots: /config/www/cam_capture
gallery component configuration to read from this source
type: custom:gallery-card
entities:
- media-source://media_source/snapshots/
title: Porch snapshot
menu_alignment: Responsive
show_reload: true
Thanks again for the component. It’s really useful.
Tom
Hi @TarheelGrad1998,
Thanks very much for the Gallery Card. It works quite well for my use case, showing short video captures. I am having a minor issue with thumbnails, however. My mp4 files have embedded thumbnail images, which I would like to be shown in the gallery, but instead I see what is probably the first frame of the video. Is there something I can do to make this work? Thanks!
Is there a way to configure tap_action and hold_action on the pictures shown?
I am still alive and ticking, and as proof, I’ve deployed v3.4 of this card.
This adds a lot of the most requested features (including the long awaited focus/scrolling fix). Please take note of the breaking changes in order to continue to have functioning captions.
Hopefully this is worth the wait.
Awesome! Thanks for that!
Is there a option to show a different image in 15 min ? sorry i’m a beginner