iantrich / config-template-card

📝 Templatable Lovelace Configurations
MIT License
425 stars 55 forks source link

Support for dashboard views? #117

Closed hneel closed 1 year ago

hneel commented 1 year ago

If I understand correctly this custom card can be used on cards, rows (not sure what these are) or elements. I would like to use it to dynamically change the title of a view in lovelace, based on an input_text helper. But this seems not to be supported. The errror message I get is "Unknown type encountered: masonry". I guess a Lovelace view is not a card.

This is what I am trying to do:

title: Stroom
views:
  - type: custom:config-template-card
    variables:
      SHELLY1_LABEL: states['input_text.labelshelly1']
    entities:
      - input_text.labelshelly1
    card:
      type: masonry
      theme: Backend-selected
      title: ${SHELLY1_LABEL}
      path: test
      badges: []
      cards:
        - type: entity
          entity: sensor.stat_shellyplug1_energy_yesterday
        - type: entity
          entity: input_text.labelshelly1

Either I am still doing something wrong, or it is ideed not supported. In the latter case: It would be neat if it would.

ildar170975 commented 1 year ago

The config-template-card cannot be used to the whole view, at may only contain a CARD. Check a possible (untested) workaround:

This issue will be closed.