Yevgenium / weather-chart-card

Custom weather card with charts
MIT License
274 stars 80 forks source link

Multiple custom elements error #95

Closed tomlut closed 2 years ago

tomlut commented 2 years ago

I've just started getting this error but have not changed the config of my cards for ages:

Logger: frontend.js.latest.202202031
Source: components/system_log/__init__.py:190 
First occurred: 23:28:57 (1 occurrences) 
Last logged: 23:28:57

http://10.1.1.100:8123/hacsfiles/weather-chart-card/weather-chart-card.js?hacstag=163941792120:15296:24 NotSupportedError: Cannot define multiple custom elements with the same tag name

Config:

type: custom:weather-chart-card
entity: weather.weatherflow_day_based_forecast
show_main: false
show_attributes: false
title: Daily Forecast

The card seems to be working fine.

tomlut commented 2 years ago

I just tried to specify this as well:

temperature1_color: rgba(228, 94, 101, 1.0)

it made no difference to the line colour.

Yevgenium commented 2 years ago

Have you tried clearing your browser cache?

tomlut commented 2 years ago

Yes. I tried a private browsing tab and a different browser just to be sure it was actually cleared. Neither changed the colour of the line and after updating to 2022.3 I am now getting:

Logger: frontend.js.latest.202203010
Source: components/system_log/__init__.py:190
First occurred: 08:08:04 (26 occurrences)
Last logged: 08:16:00

http://10.1.1.100:8123/frontend_latest/app.41ffbdd2.js:850:0 Error: Failed to execute 'define' on 'CustomElementRegistry': the name "weather-chart-card" has already been used with this registry
http://10.1.1.100:8123/lovelace/home:0:0 Uncaught
http://10.1.1.100:8123/frontend_latest/1d9c7ce1.js:1:0 NS_ERROR_FAILURE:

Untitled

tomlut commented 2 years ago

That second error was caused by there being two resources defined. Not sure how that happened. Maybe when I tried to roll back to a previous version using HACS?

Screenshot 2022-03-03 at 09-16-23 Configuration – Home Assistant

Removing one of the entries seems to have resolved all the issues.