Since I couldn’t find the refresh cycle to be configured in the image card, I used the following rule to update the item every minute:
rule "URL Test"
Time cron "0 * * ? * * *"
It seems as if the above does not trigger the image card to refresh the image - probably because the string (URL) doesn’t change.
The image in the card gets only updated when I change the string (URL) manually (e.g. now-6h -> 12h).
Is there a (simple) way to add the refresh function to the card - e.g. YAML code?
I’m sorry I can’t exactly answer your question but I saw that you are trying to get a rendered image from grafana.
Have you ever thought about embedding the panel as an iFrame and then specifiying the refresh interval by adding &refresh=5s to the URL?
That way you prevent a reload and the iframe will pull the data without refreshing.
I just wanted to leave this here in case it is useful to you - it took me a long time before I found out that was an easy way…
How do you embed an iFrame?
I tried with URL in Web Frame card, but that is not the same as iFrame, is it?
My observation was that I could not just grab the chart, there was lots of stuff around (header, return button, etc.)
The Web Frame Card is right.
You can just embed the chart - make sure you get the URL in grafana by clicking on the chart context menu and select share - embed. The chart title has to be empty if you don’t want that to be on it.
Maybe you could post a screenshot of what you currently have and I can assist further.
Nothing I can say for sure tbh - but at least it sounds like a doable enhancement IMHO. If this is something that would bring a benefit for you (besides the fact that you can use the iFrame soloution in your case) and others, it’s worth opening a github enhancement issue here, I think.
Green marked part:
The big plus with the frame is the part marked green - these are meaningful controls for the chart allowing the changes I miss by using the rendered image.
Red marked parts:
Other users (family members) might get confused when they click anywhere in the red parts. I don’t even want anyone to be able to browse the dashboard or start sharing.
Can this be removed somehow?
Blue marked area:
Irrespective of the hight I assign to the frame, there is a quite large unused area at the bottom of the frame.
Can this be removed somehow?
you have embedded the dashboard URL. You have to click the panel (chart) menu (it is even displayed on your screenshot) and select share. There you will find a tab “embed” where you will find the correct URL. Just exchange the &from and &to time ranges in the URL to your liking.
Maybe you can even construct the URL string with a dynamic time range, but let’s first get you going with the embedding!
Is there a smart way to get “buttons” to select the time range somewhere in the green marked spaces?
… or any other smart way to place buttons nicely next to each other in a card or a cell?
… in a way what “mapping” did in OH2?