Skip to content

add visibility option or direct entity_id in dynamic options #269

@Mariusthvdb

Description

@Mariusthvdb

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Currently we need the config-template-card, to have an input_select for eg sankey_min_state and dynamically change the display

type: custom:config-template-card
entities:
  - input_select.sankey_min_state
variables:
  min_state: states['input_select.sankey_min_state'].state
card:
  type: custom:sankey-chart
  title: Energie onderverdeling
  min_state: ${min_state}
etcetc

Describe the solution you'd like
A clear and concise description of what you want to happen.

Would be great if we could have support for the core option of visibility, so we can do something like:

type: vertical-stack
cards:
  - min_state: 0.1
    visibility:
      - condition: state
        entity_id: input_select.sankey_min_state
        state: '0.1'
    type: custom:sankey-chart

and drop the rest of that cared in a yaml anchor

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

an even better alternative would maybe be to add the entity_id if that input_select directly inside the config?

    type: custom:sankey-chart
    title: Energie onderverdeling
    min_state: input_select.sankey_min_state

Additional context
Add any other context or screenshots about the feature request here.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions