thomasloven / lovelace-template-entity-row

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

action: url navigates to own HA instance #18

Closed Mariusthvdb closed 3 years ago

Mariusthvdb commented 4 years ago

Above all: thanks for implementing action! Really appreciated, and makes this a true jack of all trades card! thanks.

but...

using

  - type: custom:auto-entities
    card:
      type: entities
      show_header_toggle: false
      header:
        type: picture
        image: /local/images/github_owler.png
    entities:
      - entity: automation.github_repo_update
        secondary_info: last-triggered
    filter:
      include:
        - entity_id: sensor.github*
          options:
            tap_action:
              action: more-info
            hold_action:
              action: url
              url_path: >
                {{ state_attr(config.entity,'latest_release_url') }}
            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 %} {{state_attr(config.entity,'latest_commit_sha')[0:7]}}
              {% endif %}
            secondary: >
              {{ state_attr(config.entity,'latest_commit_message')}}

'navigates' to the HA instance itself, and not the url-path configured in the template. Have I miss-syntaxed it, or is this a small bug...

the more info works as expected, really cool.

btw, can we also set a template on that field, for an other card to use than the config.entity? thanks!

thomasloven commented 4 years ago

For now the actions do not support templates. I'll look at implementing that too, in time.

Mariusthvdb commented 4 years ago

Ok thanks for confirming. please do ;-=)

thomasloven commented 3 years ago

Feature added in 1.3.0.