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

Does not render. #33

Open
jofotoo opened this issue Nov 6, 2021 · 3 comments
Open

Does not render. #33

jofotoo opened this issue Nov 6, 2021 · 3 comments

Comments

@jofotoo
Copy link

jofotoo commented Nov 6, 2021

HA 2021.11
Config as follows:

type: custom:circle-sensor-card
entity: sensor.sump_pump_humidity
name: Humidity

Repeated messages in the log:

2021-11-06 12:40:31 ERROR (MainThread) [frontend.js.latest.202111030] https://unpkg.com/@polymer/[email protected]/lib/utils/async.js?module:43:27 Uncaught TypeError: Cannot read properties of undefined (reading 'height')

2021-11-06 12:40:58 ERROR (MainThread) [frontend.js.latest.202111030] https://hass.<my-domain>.com/hacsfiles/circle-sensor-card/circle-sensor-card.js?hacstag=141952963122:30:36 Uncaught TypeError: Cannot read properties of undefined (reading 'height')

Let me know if you need further details :)

@Kh3nsu
Copy link

Kh3nsu commented Dec 18, 2021

+1

1 similar comment
@GrzesiuS
Copy link

GrzesiuS commented Jan 3, 2022

+1

@kbrohkahn
Copy link

I noticed that these lines are in the file around line 30:

.container {
            position: relative;
            height: ${config.style.height || '100%'};
            width: ${config.style.width};
            top: ${config.style.top};
            left: ${config.style.left};
            display: flex;
            flex-direction: column;
          }

Which is requiring the style: map to be set in the config. I'm not sure why this .container class needed to be included, but the error occurs when style: is not set, breaking the entire file and rendering the card as empty. Try adding this to your config:

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

For example:

type: custom:circle-sensor-card
entity: sensor.config
style:
  width: 100%
  height: 100%
  left: 0
  top: 0

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

4 participants