but i have to hard reload my web ui with f5 to get the current pictures, if I brows through my menus (does not matter if top or side) and come back, i still have the old. even days old, even if I have reloaded it on an other device.
same goes for my weather graph picture with this code
But it does never update the pic.
Picture inserted as an url is refreshed after reloading the page.
Picture added via Template and then the entity in the pic-card never renews…
Having same issue here … automation creates 3 doorbel pictures stored in local folder - snapshot1, snapshot2 and snapshot3.
Trying to display the pictures in a dashboard, now via Picture entity card … but the image is NEVER refreshed when someone else rings the bell (through new snapshots are produced).
So If I understand correctly, I need to create an helper “triggered image” …can’t find this on my HA :
ok - but can you please confirm then what you do is a trigger based on the time, for exemple every hour:10 minutes will take the new picture as reference ?
That is not going to work for me because my snapshots are generated when someone rings the bell, and that can be 2 times a day like5 times an hour …
I also saw another option which is to add a “?v=xxxx” to the URL of the picture … but still investigated that too
I want to display those 3 files on a dashboard, I understand I need to use the Picture entity card.
The issue : picture entity card is keeping cache and not displaying the LATEST produced files.
So you propose to use Template image integration, then you propose to use the “Trigger image” … and this is where I get lost. Can not find it in the UI, you say it is YAML only … ok …
but I do not get what the trigger will do … it is based on the time (ok, every 5 minutes, 10 minutes etc …) but still looking at the image URL stored locally, so I do not understand why using the trigger will allow to get rid of the cache issue.
In my case the correct image need to be displayed when someone rings the bell, meaning when the new snapshots are produced … NOT every 10 minutes or 5 minutes or an hour …
You are making this way more confusing than it needs to be.
If you want to change the picture doorbell-snaphot-1/2/3 every time the doorbell rings then trigger on the doorbell being pressed.
e.g.
template:
- trigger:
- trigger: state
entity_id: binary_sensor.doorbell_button
from: 'off'
to: 'on'
image:
- name: Doorbell Snapshot # -> entity id = image.doorbell_snapshot
url: >
{% set n = 0 if n is not defined else n %}
{% set n = n + 1 %}
{% set n = 1 if n == 4 else n %}
http://homeassistant.local:8123/local/doorbell-snaphot{{n}}.jpg