Code Monkey home page Code Monkey logo

Comments (11)

AmoebeLabs avatar AmoebeLabs commented on August 10, 2024 1

no idea, its the profile picture of the users from HA itself. they dont have an extension.

Ok. Then I know how this can be fixed.

You can try to disable injection by setting

  entities:
  options:
    svginjection: false

and see if that already helps.

from swiss-army-knife-card.

stinobook avatar stinobook commented on August 10, 2024 1

i still have the disable cache option enabled you told me about last time.
image
and of course reloaded the page/browser.

from swiss-army-knife-card.

AmoebeLabs avatar AmoebeLabs commented on August 10, 2024 1

Ok. I will change the logic.

The api as image is not a real image, it returns an image. The svg injector tries to treat this as an svg. Fails but did already set the hidden class. I will change some checks to prevent this from happening (I hope πŸ˜„ )

from swiss-army-knife-card.

AmoebeLabs avatar AmoebeLabs commented on August 10, 2024 1

I can replicate the problem:

image

The HA API returns an image/jpeg. So at least I know that now πŸ˜„

Besides the fact that this image is treated as an SVG (which it isn't), the additional uncaught error, causes the hidden class NOT to be removed.

However, If I catch the error, and set options.svginjection : false in the handler, and fire the renderer once again, the api picture is displayed (Ricky). The person cards from 1 to 3 have:

  • Person: An icon
  • Tha Washer: An image at /local/
  • Ricky: An image at /api/

image

I keep this at least as a fallback: if an SVG can't be injected, it is displayed as an external image. If that fails too, well, then I'm out of options and the user specified an illegal image that can't be displayed by an image object.

from swiss-army-knife-card.

stinobook avatar stinobook commented on August 10, 2024

PS: not all usersvg, only those 2 for some reason.. all others work fine.

from swiss-army-knife-card.

AmoebeLabs avatar AmoebeLabs commented on August 10, 2024

Weird stuff.

These two are not injected, hence should not be hidden.

What type of images are these? Png, jpg, svg?

from swiss-army-knife-card.

stinobook avatar stinobook commented on August 10, 2024

no idea, its the profile picture of the users from HA itself. they dont have an extension.

from swiss-army-knife-card.

stinobook avatar stinobook commented on August 10, 2024

image
class hidden is still applied
i also tried to set
classes:
hidden: false

but that didnt work either.

from swiss-army-knife-card.

AmoebeLabs avatar AmoebeLabs commented on August 10, 2024

image class hidden is still applied i also tried to set classes: hidden: false

but that didnt work either.

You did refresh the yaml files and/or clear caches?

The hidden class is only added if svginjection is set to true. So that should not happen if set to false.

from swiss-army-knife-card.

AmoebeLabs avatar AmoebeLabs commented on August 10, 2024

i still have the disable cache option enabled you told me about last time.
image
and of course reloaded the page/browser.

Ok. Sometimes Lovelace does not see changes in sub-files, and HA does not reload the views as a result.
I still need to change the main dashboard file for a reload to occur. In that case HA shows a message saying that it is changed, and need to reload the view.

Change some text for the view to make sure the latest config is loaded…

from swiss-army-knife-card.

stinobook avatar stinobook commented on August 10, 2024

image
image

still the same.

from swiss-army-knife-card.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.