thomasloven/lovelace-template-entity-row

config.entity not supported in card-mod [WRONG ISSUE]

ildar170975 opened this issue · 1 comments

The config.entity variable is supported for defining values for name, icon etc:

  - type: custom:template-entity-row
    entity: input_boolean.test_boolean
    state: >-
      {{states(config.entity)}}

изображение

but does not work inside card-mod - we have to use an entity_id explicitly:

type: entities
entities:
  - entity: input_boolean.test_boolean
  - type: custom:template-entity-row
    entity: input_boolean.test_boolean
    state: state
    card_mod:
      style:
        div#wrapper: |
          .state {
            color: magenta;
          }
  - type: custom:template-entity-row
    entity: input_boolean.test_boolean
    state: state
    card_mod:
      style:
        div#wrapper: |
          .state {
            {% if is_state('input_boolean.test_boolean','on') %}
            color: magenta;
            {% else %}
            color: cyan;
            {% endif %}
          }
  - type: custom:template-entity-row
    entity: input_boolean.test_boolean
    state: state
    card_mod:
      style:
        div#wrapper: |
          .state {
            {% if is_state('config.entity','on') %}
            color: magenta;
            {% else %}
            color: cyan;
            {% endif %}
          }

изображение

My bad.
config.entity must be used w/o '.
Sorry!