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

Receiving error: TypeError: Cannot read properties of undefined (reading 'styles') #57

Closed
thewolfman56 opened this issue Sep 21, 2022 · 3 comments

Comments

@thewolfman56
Copy link

thewolfman56 commented Sep 21, 2022

Card was working until I updated this morning to v1.4.1.
I was using the following code for the card.

type: custom:room-card
title: Pool
hide_title: false
icon: mdi:pool
show_icon: true
info_entities:
  - entity: sensor.water_sensor_1
    show_icon: false
  - entity: sensor.water_sensor_1
    show_icon: true
    icon: mdi:pool-thermometer
  - entity: binary_sensor.heat_pump
    name: Heat Pump
    show_name: true
rows:
  - entities:
      - entity: light.pool_lights_no
        name: Pool Light Group
        tap_action:
          action: toggle
        hold_action:
          action: more-info
      - entity: light.baja_light
        tap_action:
          action: toggle
      - entity: light.pool_lights
        tap_action:
          action: toggle
      - entity: light.grotto_light
        tap action: toggle
      - entity: light.waterfall_light
        name: Waterfall Lights
        tap_action:
          action: toggle
  - entities:
      - entity: switch.waterfall_scene_switch
        name: Waterfall
        icon: mdi:pool
      - entity: switch.waterfall_scene_switch
        name: Waterslide
        icon: mdi:slide

I tried starting a new card from a blank template. As soon as I enter just the following code, I receive that error in the visual editor

type: custom:room-card
rows:
- entities:

I tried down-grading to v1.3.9 and still receive the same error now.

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@marcokreeft87
Copy link
Owner

marcokreeft87 commented Sep 21, 2022

You are missing show_icon: true on the last 2 entities. I had the same error for a second there. But when I saved it was gone. Can you try to redownload the card?

@marcokreeft87
Copy link
Owner

Good thing is, I can confirm that 1.4.1 doesnt have the issue. But its not ready for release :(

@marcokreeft87
Copy link
Owner

We going to continue in #56

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

2 participants