custom-cards / circle-sensor-card

A custom component for displaying sensor values as cards or elements
Apache License 2.0
174 stars 23 forks source link

TypeError: undefined is not an object (evaluating 'config.style.height') #32

Open w0vka opened 2 years ago

w0vka commented 2 years ago

Hi there, i have noticed that a few days ago my lovelace dashboad isn't showing any circle-sensor-card details.. The problem seems to be since the card version 1.2.1.

I could see this error in my logs:

Logger: frontend.js.latest.202108300
Source: components/system_log/__init__.py:190
First occurred: 9:42:40 AM (415 occurrences)
Last logged: 11:47:19 AM

https://myurl.duckdns.org:****/hacsfiles/circle-sensor-card/circle-sensor-card.js?hacstag=141952963122:30:181 TypeError: undefined is not an object (evaluating 'config.style.height')
:0:0 Script error.
https://myurl.duckdns.org:****/hacsfiles/circle-sensor-card/circle-sensor-card.js?hacstag=141952963121:24:36 Uncaught TypeError: Cannot read properties of undefined (reading 'height')
https://myurl.duckdns.org:****/hacsfiles/circle-sensor-card/circle-sensor-card.js:30:36 Uncaught TypeError: Cannot read properties of undefined (reading 'height')

After downgrade to 1.2.0 the dashboard is showing all the details again. Ha version is 2021.9.6

iamMonzurul commented 2 years ago

Please add the style property to fix the issue.

style:
    top: 50%
    left: 50%
    width: 100%
    height: 100%

Like this:

color_stops:
    50: '#55FF55'
    75: '#5555FF'
    100: '#FF5555'
style:
    top: 50%
    left: 50%
    width: 100%
    height: 100%