Is there an easy way to figure out, which card is using polymer?

Hi there,

I am getting the following log message:

Logger: frontend.js.latest.202304111
Source: components/system_log/__init__.py:257
First occurred: 06:51:19 (2 occurrences)
Last logged: 08:25:53

WARNING: Polymer will be removed from window in Home Assistant 2023.5. More info: https://developers.home-assistant.io/blog/2023/04/04/deprecating_polymer

now. I am trying to figure out, which of my custom cards might use polymer… but is there an easy way to do so?
I would prefer not to disable each single card one by one in HACS - to check when this log message will be gone…
So any hint would be much appreciated :slight_smile:

Thanks!

From other posts I’ve seen, apparently not.

You could make a test view, copy a card (just one of a type) there and reload the page while checking the logs.

hm… that’s unfortune…
Then I will see when I find the time to do further tests.
Thanks!

Yeah, apparently no easy way:

Got this message too right now and by searching for more info I bounced on this thread.

Just found out that with a text editor (notepad++, vscodium, …) when you search for polymer in your www folder, you will find the cards that use this.

1 Like

OK, I’ll have a look later today
Thanks.

Just be aware as Marius has posted earlier, some cards will refer to the Polymer license in their .js file, but are not actually using Polymer.

Such cards are not the source of the warning in the logs, and should continue to function fine.

2 Likes

Thanks!
With this information and tips, I found three possible sources…

  • Mushroom Cards (seems to be the copy-right information)
  • Power Distribution Card (seems to be the copy-right information)
  • OnlyLockLock Card (which seems to actually use polymer)…

I raised an issue to the devs for this case.
Hope, this information does help others as well :slight_smile:

1 Like

For those on supervised with the Studio Code Server extension this is a decent way to go about it.

image

The regex doesn’t cover all comment types but it should filter out a lot of them. It may be possible to craft a regex that looks for ‘polymer’ that isn’t between the opening/closing comment markers, but I’m not sure how to deal with multi-line searches and negating the comment markers in VS code’s regex engine.

In my setup we can easily tell that love-lace-text-input-row.js is the only offender.

2 Likes

For copy/paste:

^[^*]*polymer.*$
3 Likes

Don’t know why I didn’t think to add that, lol.

Thanks.

So I’m still getting the warnings after killing that one custom component. After performing this search everywhere I found that there were also a number of hits under /config/custom_components/hacs/hacs_frontend/*.js, so it seems that the HACS frontend itself uses Polymer?

There’s no issue open about this on the respective repositories tracker, but it seems like such an obvious thing to point out given how many people use HACS that I’m questioning if this is somehow something else; however, the frontend source does import packages from polymer…

Yeah seeing this too. I’ve asked on the HACS Discord.

EDIT: And the answer is “not directly”. Though it is still there for the moment. Dev is aware.

are you using a specific view of HACS?

or

I am running two HA instances… one for testing and one productive… after removing the above card, I don’t see the Warings in the logs anymore… neither on my productive environment, nor on my other one… in both - HACS is running…

I wasn’t even aware you could make HACS look like the top one. Is that the experimental frontend, that I presume is accessed via the “Enable experimental features” (not sure what it would be in Deutsch) checkbox in the HACS configuration?

So no, I’m using the standard bottom view. Hm…

yes, the above one is the experimental view…
I thought, it might make a difference in the components used - but since I don’t have any warnings about polymer on my system anymore, this shouldn’t be the case…

Polymer is still in the experimental frontend too. Though again, it is unused.

1 Like

Well I have quite the mystery on my hands. The only hits for ‘polymer’ in my entire HA install are from

  • home-asssistant.log
  • /config/custom_components/hacs/hacs_frontend/*.js
  • /config/custom_components/hacs/hacs_frontend/experimental/*.js
  • /config/custom_components/hacs/utils/default.repositories
  • Copyright comments in /config/www/community/banner-card/banner-card.js

Just as a sanity check I’ve confirmed that last one uses Lit.

:upside_down_face:

Once HACS is updated you should be good.

Hopefully. I’m just a bit confused by the current state of affairs since it being “disabled” as you mentioned makes it sound like it isn’t loaded by default and CChris doesn’t have the warning despite also using HACS so I was under the impression it couldn’t be responsible. I’ll find out one way or another in time.