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

Main entity still required #56

Closed
usernein opened this issue Sep 21, 2022 · 21 comments
Closed

Main entity still required #56

usernein opened this issue Sep 21, 2022 · 21 comments
Assignees

Comments

@usernein
Copy link

Describe the bug
I read in the release notes that a main entity is not required anymore, but i'm still getting an error when i don't set "entity"
I'm using v1.4.1

Screenshots
Captura de Tela 2022-09-21 às 14 48 59

Desktop (please complete the following information):

  • OS: macOS
  • Browser: chrome
  • Version: 105

This is the yaml:

type: custom:room-card
title: Quarto
entities:
  - entity: light.quarto
    state_color: true
    show_name: false
  - entity: media_player.tv
    show_name: false
  - entity: switch.velocidade_1
    icon: mdi:fan-speed-1
    show_icon: true
    show_name: false
  - entity: switch.velocidade_2
    icon: mdi:fan-speed-2
    show_icon: true
    show_name: false
  - entity: switch.velocidade_3
    icon: mdi:fan-speed-3
    show_icon: true
    show_name: false
@marcokreeft87
Copy link
Owner

Can you check your console? Does it say 1.4.0 or 1.4.1?

@marcokreeft87
Copy link
Owner

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

@thewolfman56
Copy link

Mine shows 1.4.1

image

@marcokreeft87
Copy link
Owner

In Developer tools console I meant

@thewolfman56
Copy link

My apologies. I have never used the developer tools to view the download version. I could look at it for you, but would need to know how.

@marcokreeft87
Copy link
Owner

Press F12 and it should be on the tab " console ". Refresh the page and you will see it

@marcokreeft87
Copy link
Owner

Try version 1.5.0 and see if it works

@markwoodward86
Copy link

Came here to report the same issue. I confirm 1.5.0 resolves the bug

@markwoodward86
Copy link

markwoodward86 commented Sep 21, 2022

although it does look like 'title' is not being picked up any longer

Mobile_View_–_Home_Assistant

@thewolfman56
Copy link

Press F12 and it should be on the tab " console ". Refresh the page and you will see it

My apologies. I was looking in the Home Assistant Developer Tools. On the Chrome console, my version is 1.4.0 even though HACS shows I downloaded 1.4.1.

I'll try to download 1.5.0

@marcokreeft87
Copy link
Owner

marcokreeft87 commented Sep 21, 2022

although it does look like 'title' is not being picked up any longer

Mobile_View_–_Home_Assistant

Could be a cache issue. Do you have a way to clear it? Otherwise I will look at it tomorrow.

Or try without hide_title ?

@marcokreeft87
Copy link
Owner

Press F12 and it should be on the tab " console ". Refresh the page and you will see it

My apologies. I was looking in the Home Assistant Developer Tools. On the Chrome console, my version is 1.4.0 even though HACS shows I downloaded 1.4.1.

I'll try to download 1.5.0

Yes I had the same issue. HA is super weird with caching unfortunately

@thewolfman56
Copy link

Restarted HA and downloaded 1.5.0. Cleared cache and now had to set "show_icon: true" for the 2nd row switches (wasn't necessary previously, but not a problem to fix)

I am having the same issue with the title, but mine may be even stranger as I had info entities on the Title row. Now they are mixed in and overlap with the first row of entities.
image

@marcokreeft87
Copy link
Owner

@thewolfman56 check out v1.5.1 I think I found the issue

@marcokreeft87
Copy link
Owner

although it does look like 'title' is not being picked up any longer

Mobile_View_–_Home_Assistant

Can you try 1.5.1?

@thewolfman56
Copy link

although it does look like 'title' is not being picked up any longer
Mobile_View_–_Home_Assistant

Can you try 1.5.1?

Seems to be working as it had previously. Title shows up for me.

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
        show_icon: true
      - entity: switch.waterfall_scene_switch
        name: Waterslide
        icon: mdi:slide
        show_icon: true

image

@thewolfman56
Copy link

And thanks to this issue, I was able to see that I had used the same scene switch twice in the 2nd row even though I changed the icon.

@aIexus
Copy link

aIexus commented Sep 22, 2022

Why it is not possible to show icon when main entity is not defined?

@marcokreeft87
Copy link
Owner

Why it is not possible to show icon when main entity is not defined?

Because with the icon you control the entity. If you only want to show an icon you can use hide_title: true. Its all in the wiki :)

@aIexus
Copy link

aIexus commented Sep 22, 2022

Plus I have strange error [TypeError: t is undefined] when I make undefined the main entity:

           - type: custom:room-card
             title: Hallway
             hide_title: false
             icon: mdi:door-closed-lock
            #  entity: sensor.hallway_lumi_weather_temperature
             show_icon: true
            #  tap_action: none
            #  double_tap_action: none
             entities:
               - entity: light.hallway_rgb_bulb
                 show_icon: true
                 state_color: true
                 name: Light
               - entity: binary_sensor.tapo_camera_motion
                 show_icon: true
                 state_color: true
                 hide_unavailable: true
                 name: Motion
               - entity: camera.tapo_camera_sd
                 show_icon: true
                 name: Camera
               - entity: binary_sensor.hallway_entrance_door_contact
                 show_icon: true
                 state_color: true
                 name: Door
             info_entities:
               - entity: sensor.hallway_lumi_weather_humidity
                 format: precision1
               - entity: sensor.hallway_lumi_weather_temperature
                 format: precision1

@aIexus
Copy link

aIexus commented Sep 22, 2022

Why it is not possible to show icon when main entity is not defined?

Because with the icon you control the entity. If you only want to show an icon you can use hide_title: true. Its all in the wiki :)

I want to use title + icon, but without control :)
I want to have cool look icon+title :)

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

5 participants