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

allow card_param to be a path #480

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mrnerdhair
Copy link

This parses card_param as a path to a property rather than the name of a property which must be on an immediate child. This is useful if you'd like to use a wrapper card rather than a card which shows entities directly.

@ildar170975
Copy link

@mrnerdhair
Could you post an example where this feature can be used?
I guess you mean this case:

type: some_card
...
some_option:
  ...
  option_to_be_populated:
    - ...
    - ...
...

and then you can use

card_param: some_option.option_to_be_populated

But I do not recall a card with such structure.

@mrnerdhair
Copy link
Author

I was trying to do something along the lines of this, where card.entities was the correct path:

type: custom:mod-card
card:
  type: vertical-stack
  entities: []
card_mod:
  style: |
    ha-card {
      // ...
    }

@ildar170975
Copy link

ildar170975 commented Dec 6, 2024

Well, mod-card could be a good example - but:
mod-card is needed for cards w/o ha-card - and vertical-stack is a good example, but it does not have an entities option. Perhaps you should have meant a cards option:

type: custom:auto-entities
card_param: card.cards
card:
  type: custom:mod-card
  card:
    type: vertical-stack
  card_mod: ...
filter:
  include:
    - domain: person
      options:
        type: entity

Do you know any other possible applications apart of mod-card?

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

Successfully merging this pull request may close these issues.

2 participants