thomasloven / lovelace-q-card

MIT License
9 stars 0 forks source link

No card being displayed #2

Closed SeLLeRoNe closed 4 years ago

SeLLeRoNe commented 4 years ago

Hi there, thanks for pointing me to this card, it seems very interesting. Unfortunately i am having troubles having it working.

I have made a basic configu, which should work (basically it is based on the readme example):

Dashboard Configuration:

---
# This is actually just a bootstrap for my Lovelace configuration.
# It loads all resources for Lovelace dynamically from subfolders
# inside the `lovelace/resources` directory.
#
# Views are actually include one by one, this to guarentee the order of
# the tabs of the view in the UI.
#
title: Test
preload_cards:
  - card-tools
  - markdown
preload_rows:
  - divider
custom_header:
  compact_mode: true
  footer_mode: false
  hide_header: false
  header_text: '{{ time }}' # See templates section for more on this.
  hide_config: true
  hide_raw: true
  hide_unused: true
  hide_help: true
  # Add the below to theme the header
  background: var(--app-header-background-color)
  elements_color: var(--app-header-text-color)
  active_tab_color: var(--state-icon-active-color)
  tab_indicator_color: var(--state-icon-active-color)
animated_background: !include lovelace/animated_backgrounds/test.yaml
decluttering_templates: !include_dir_merge_named lovelace/templates/
q-cards:
  card1:
    type: entities
    entities:
      - light.bedroom_luca_light_1
views:
  - !include lovelace/views/test.yaml
  - !include lovelace/views/test_map.yaml
  - !include lovelace/views/surveillance.yaml

View:

title: Test
icon: mdi:tune
panel: true
path: test
animated_background: test
cards:
  - type: custom:layout-card
    layout: vertical
    cards:
      - type: custom:state-switch
        entity: light.bedroom_luca_light_1
        default: "off"
        states:
          "on":
            type: custom:q-card
            card: card1
          "off":
            type: custom:q-card
            card: card1
      - type: light
        entity: light.master_bedroom_bed_led
      - type: entities
        show_header_toggle: false
        entities:
          - sensor.master_bedroom_bed_led_estimated_current
          - sensor.master_bedroom_bed_led_free_memory
          - switch.master_bedroom_bed_led_nightlight
          - switch.master_bedroom_bed_led_sync_receive
          - switch.master_bedroom_bed_led_sync_send
          - sensor.master_bedroom_bed_led_uptime
          - sensor.master_bedroom_bed_led_wi_fi_bssid
          - sensor.master_bedroom_bed_led_wi_fi_channel
          - sensor.master_bedroom_bed_led_wi_fi_rssi
          - sensor.master_bedroom_bed_led_wi_fi_signal
      - break

The light is on an off status but doesn't seems to be the problem: image

A few things to note, I can't use type: q-card, it returns that the card doesn't exists, I have used custom:q-card

If I load the card by itself, it "works", kind of... Meaning that the whole page become that card.. image

Config for the above screenshot:

title: Test
icon: mdi:tune
panel: true
path: test
animated_background: test
cards:
  - type: custom:layout-card
    layout: vertical
    cards:
      - type: custom:q-card
        card: card1
      - type: custom:state-switch
        entity: light.bedroom_luca_light_1
        default: "off"
        states:
          "on":
            type: custom:q-card
            card: card1
          "off":
            type: custom:q-card
            card: card1
      - type: light
        entity: light.master_bedroom_bed_led
      - type: entities
        show_header_toggle: false
        entities:
          - sensor.master_bedroom_bed_led_estimated_current
          - sensor.master_bedroom_bed_led_free_memory
          - switch.master_bedroom_bed_led_nightlight
          - switch.master_bedroom_bed_led_sync_receive
          - switch.master_bedroom_bed_led_sync_send
          - sensor.master_bedroom_bed_led_uptime
          - sensor.master_bedroom_bed_led_wi_fi_bssid
          - sensor.master_bedroom_bed_led_wi_fi_channel
          - sensor.master_bedroom_bed_led_wi_fi_rssi
          - sensor.master_bedroom_bed_led_wi_fi_signal
      - break

I hope I have provided enough information, if not please let me know.

Thanks! Andrea

thomasloven commented 4 years ago

Try q_cards not q-cards (which yaml interprets as q minus cards).

SeLLeRoNe commented 4 years ago

Nope

Custom element doesn't exist: q_card.
type: 'custom:q_card'
card: card1

Tried with and without custom and with and without quotes, same issue

SeLLeRoNe commented 4 years ago

Oh.. you meant in the dashboard.. testing!

SeLLeRoNe commented 4 years ago

I can't believe I missread that line that many times... it works now :/ sorry for the waste of time