Using state value as name in picture entity card

You cant use templates in Lovelace cards without wrapping the card in this card:

Then it would be:

          - entity: sensor.trash_first_next_item
            name_template: >
             {{ states('sensor.trash_first_next_date') }}