Use config-template-card with default entity tap action

Hi everyone,

I’m using the config-template-card, a good card for me.

The sample change the theme of the internal card (type: entity) according to the temperature and works fine.

My current problem is:

The default tap action of internal card (type: entity) doesn’t show the history popup using config-template-card.

Do you have any idea to solve this?

Thanks

      - type: custom:config-template-card
        variables:
          getTheme: |
            value => {
              if (value <= 0 || value >= 35) {
                return 'Dark - Red';
              }
              if (value <= 10 || value >= 30) {
                  return 'Dark - Orange';
              }
              return 'Dark - Green';
            }
          currentValue: states['sensor.wx_temperatura'].state
        entities:
          - sensor.wx_temperature
        card:
          type: entity
          entity:
            - sensor.wx_temperature
          name:
            - ds
          state_color: true
          theme: ${ getTheme(currentValue) }

Then please post in the dedicated "config-template-card" thread.
Knowledge placed in one place instead of 100500 threads; you will get answers faster.

The “name” option does not support a list.
Use “name: ds” instead.

Does not work with "sensor" domain.

The Entity card DOES NOT support tap_action (which is strange for me too).

1 Like

Hi again,

this entity card supports tap_action, if you write the entity without list, the history appears on click.

entity: sensor.wx_temperature

Thanks for your comments.

Correct, this is what I missed.