thomasloven / lovelace-template-entity-row

🔹 Display whatever you want in an entities card row.
MIT License
210 stars 16 forks source link

templates unstable on HA 105.2 #13

Closed Mariusthvdb closed 4 years ago

Mariusthvdb commented 4 years ago

ever since updating to 105.x the templates in my config below are constantly going back and forth between the full template code being displayed in the frontend, and the output these templates should create. They worked perfectly up to HA 104.3.

  - type: custom:auto-entities
    card:
      type: entities
      title: Github repos
      show_header_toggle: false
    entities:
      - entity: automation.github_repo_update
        secondary_info: last-triggered
    filter:
      include:
        - entity_id: sensor.github*
          options:
            type: custom:template-entity-row
            state: >
              {% if state_attr(config.entity,'latest_release_url') %}
              {{ state_attr(config.entity,'latest_release_url').split('tag/')[1]}}
              {% else %} Not set
              {% endif %}
            secondary: >
              {{ state_attr(config.entity,'latest_commit_message')}}

Ive tested the same config with the dummy-row card, and that is fully stable, thus taking out the auto-entities card as possible cause for this issue

  - type: custom:auto-entities
    card:
      type: entities
      title: Github repos
      show_header_toggle: false
    entities:
      - entity: automation.github_repo_update
        secondary_info: last-triggered
    filter:
      include:
        - entity_id: sensor.github*
          options:
            type: custom:dummy-entity-row
#            state: >
#              {% if state_attr(config.entity,'latest_release_url') %}
#              {{ state_attr(config.entity,'latest_release_url').split('tag/')[1]}}
#              {% else %} Not set
#              {% endif %}
#            secondary: >
#              {{ state_attr(config.entity,'latest_commit_message')}}
  #            secondary: "{{ as_timestamp(states[config.entity].last_changed)| timestamp_custom('%X - %D') }}"
          sort:
            method: name

please have a look what could be causing the templates not to show up stable?

Schermafbeelding 2020-02-07 om 00 38 00

see also report on https://community.home-assistant.io/t/template-entity-row-put-templates-in-an-entities-row/160167/25?u=mariusthvdb

Mariusthvdb commented 4 years ago

or would this be an auto-entities card issue? If so, let me know and I'll post the issue there.

meanwhile no change, view keeps switching between as is should be and the view above with the full templates displayed.

rpitera commented 4 years ago

Marius, I didn't see any such issues in 0.105.x up to 0.105.5 but while I use a LOT of template-entity-rows, I don't use them in any auto-entities cards. (Yet, LOL) I'm inclined to agree this may be an issue of the interaction between auto-entities and template-entity-row.

Mariusthvdb commented 4 years ago

already reported back in the community, and completely forgot to do so here, really sorry about that...

the issue was fixed by Thomas's updating the card.

only gripe left is missing tap/hold-action now ;-) will close this as it is solved. again, my apologies for keeping it open so long.