thomasloven / lovelace-template-entity-row

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

Feature request: template actions for url_path in tap_actions #72

Closed ricardok-sp closed 2 years ago

ricardok-sp commented 2 years ago

It would be nice to have the possibility to customize the tap_actions. Something like this:

        state: '{{state_attr(config.entity, ''ip'')}}'
        tap_action:
          action: url
          url_path: >
            '{{state_attr(config.entity, ''ip'')}}'

In this case, I have the entity-row running inside auto-entities in order to produce a list of IPs for the devices in my LAN. The intent of the hyperlink would be to open each device.

Tks!

ricardok-sp commented 2 years ago

It turns out that the solution is already possible, and easy to be implemented, in 1.3.0:

state: '{{state_attr(config.entity, ''ip'')}}'
tap_action: |
  {
    "action": "url",
    "url_path": "http://{{state_attr(config.entity, 'ip')}}",
  }