Skip to content

[FR] Fallback value of a variable to another variable #84

@clau-bucur

Description

@clau-bucur

Describe the solution you'd like
Is it possible to define the default value of a variable, as the value of another variable?

Someting like:

my_template:
  default:
    - history_entity: '[[entity]]'
  card:
    type: my_card
    entity: '[[entity]]'
    tap_action:
      action: fire-dom-event
      browser_mod:
        service: browser_mod.more_info
        data:
          entity: '[[history_entity]]'

And when I call it withoiut specifying a value for history_entity it will use the value specified for the entity variable:

- type: custom:decluttering-card
  template: my_template
  variables:
    - entity: sensor.my_entity

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions