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

Auto-refresh only works with Firefox #26

Open
makoONE opened this issue Mar 12, 2023 · 11 comments
Open

Auto-refresh only works with Firefox #26

makoONE opened this issue Mar 12, 2023 · 11 comments

Comments

@makoONE
Copy link

makoONE commented Mar 12, 2023

I have integrated a refreshable-picture-card in a home assistant dashboard. I noticed that the automatic refresh of the card only works with the Firefox browser. With other browsers like Chrome, Edge and Safari the automatic refresh does not work. The behavior is independent of the value of refresh_interval in the card configuration. Is this a bug in the card or a feature of the respective browser?

@macflyhub
Copy link

macflyhub commented Mar 12, 2023

I updated a few days ago via home assistant hacs and could not understand why my images that save from my IP cameras 'on motion' to a tmp folder and then get displayed in refreshable-picture-card where not updating. (Same image remained no matter what I did)
After messing around for literally the entire day until I finally tried the firefox and it worked.
So I can confirm the new version only works in firefox and not chrome/brave/edge/etc..
There must be some caching issue that is causing a bug in chrome/brave/edge/...
PS: The slider for refresh interval is not working but putting in manually does work - unrelated I am sure.

@howi42
Copy link

howi42 commented Mar 13, 2023

Is there something we can do from our side ( besides refreshing the browsercache ) ?

@makoONE
Copy link
Author

makoONE commented Mar 14, 2023

I am not a javascript developer, but is the browser behavior perhaps related to the fact that since card version 0.2.0 code fragments are now loaded from external CDN unpkg.com?

@makoONE
Copy link
Author

makoONE commented Mar 16, 2023

I have obtained the refreshable picture card via HACS. What is the best way to downgrade to the previous version?
The card also does not update in the Home Assistant app and is therefore unusable for me.

@AlainBRUNEL
Copy link

same for me
refresh interval don't work on chrome

@macflyhub
Copy link

@makoONE My 55" display is made up using many of these cards and it literally has ruined my home assistant by not having this working. I cannot figure out how it can be fixed and the developer isn't commenting here. I can only give it another week before I am forced to abandon ship.

@howi42
Copy link

howi42 commented Mar 23, 2023 via email

@macflyhub
Copy link

I must be really stupid because I can't figure this out.

@howi42
Copy link

howi42 commented Mar 24, 2023

Sorry, my answer was too fast !
I used a solution from a different thread :
https://community.home-assistant.io/t/refresh-cached-images-in-lovelace-picture-elements-maybe-other-places-too/98351/9

Here is my version:

The picture which is update regularly via an automation : /local/media/meteogram.svg

Then I created a Generic Camera in Integrations , using this url :
http://192.168.10.41:8123/local/media/meteogram.svg

This resulted in an Entity : camera.meteogramm_2

In the UI I defined a card :
`
type: custom:config-template-card
entities:

  • camera.meteogramm_2
    card:
    show_state: false
    show_name: false
    type: picture-entity
    camera_image: camera.meteogramm_2
    aspect_ratio: 1
    entity: camera.meteogramm_2

Hope this helps.

  • Wolfgang

@AlainBRUNEL
Copy link

Is there a workaround for this bug ?

@sanzoghenzo
Copy link
Contributor

Oh boy, I'm really sorry for this issue!

I introduced the # url because I read that it would be easier on servers, but tested only on firefox... I'm a too lazy programmer!

Glad that it is fixed in 0.2.1!

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

5 participants