No entity provided for more-info dialog on a custom:template-entity-row

Hello,
I want to show the more-info window that comes automatically in a lovelace ‘entity-card’ or ‘button card’ but in a ‘custom:button-card’
2022-01-07_14h50_08

So I use this yaml code :

cards:
  - type: entities
    entities:
      - type: custom:template-entity-row
        icon: mdi:speedometer
        name: Débit eau potable actuel
        state: '{{states.sensor.flow_l.state|float}} l/min'
        secondary_info: last-changed
        tape_action:
          action: more-info

But I got the message : ‘No entity provided for more-info dialog’
Also the secondary_info: last cahnged does not appears
Can someone help me ?
Thanks in advance
Patou

  1. These issues are better to discuss in ONE corresponding thread.
  2. There is no need to use "| float" in your case since there are no math operations in the template.
  3. The error’s reason is explained by the message - there is no entity provided, nothing to show in more-info. Same is for "last-changed". Check the docs.

To fix it, you need to add an entity: line specifying your entity for ‘more info’, like this:

cards:
  - type: entities
    entities:
      - type: custom:template-entity-row
        entity: sensor.flow_l    ### THIS IS THE LINE YOU NEED TO ADD
        icon: mdi:speedometer
        ...etc

…more-info will pop-up after that.

To fix the ‘secondary info’ problem… for template-entity-row, you need this line instead (not ‘secondary_info:’ that you are using):

secondary: '{{ relative_time(states.sensor.flow_l.last_updated) }} ago'

(I’m playing now with template-entity-row and have the same exact two problems… and fixed, so trying to help future visitors).