thomasloven / lovelace-card-mod

🔹 Add CSS styles to (almost) any lovelace card
MIT License
1.06k stars 169 forks source link

i.setConfig is not a function #274

Closed darth-aragoth closed 1 year ago

darth-aragoth commented 1 year ago

My Home Assistant version: 2023.4.2

My lovelace configuration method (GUI or yaml): GUI

What I am doing: Trying to add picture to entities card.

What I expected to happen: See picture in entities card

What happened instead: Error:

i.setConfig is not a function
type: custom:card-mod
card:
  type: picture-glance
  entities:
    - camera.xiaomi_cloud_map_extractor

Minimal steps to reproduce: Add card with code specified below.

type: entities
entities:
  - entity: vacuum.roborock_vacuum_s6
    type: custom:multiple-entity-row
    secondary_info: last-updated
  - entity: sensor.roborock_s6_battery
  - type: custom:card-mod
    card:
      type: picture-glance
      entities:
        - camera.xiaomi_cloud_map_extractor
show_header_toggle: false
state_color: true

By putting an X in the boxes ([]) below, I indicate that I:

ildar170975 commented 1 year ago
  • type: custom:card-mod card:

This code is wrong. Check docs for a correct syntax. And I think the initial purpose is wrong, probably you mistook card-mod with hui-element.

darth-aragoth commented 1 year ago

Thank you, that's exactly what I was looking for.

I tried to follow config from this example: https://community.home-assistant.io/t/best-way-to-get-grafana-chart-into-lovelace-card/128857/20

ildar170975 commented 1 year ago

Please close the issue then if it is solved )

darth-aragoth commented 1 year ago

Thank you once again :-)

ildar170975 commented 1 year ago

You are very welcome!