Change mushroom title depending on energy-date-selection date

Hi people,
I’m trying to change the title depending on a selected day from the energy-date-selection entity. Suppose I have this:

If the date is set to be the current date, the Mushroom title entity’s title should be set to “Stromverbrauch heute” (just like the screenshot shows), however when setting the energy-date-selection entity to a different day, I want the title to be set to “Stromverbrauch vom xx.xx.xxxx”.

How do I achieve this using templates? All entities are being held inside a grid.

All I know is that I can use {% if ... %} but that’s it unfortunately.

I’d be grateful for any help.

Thanks in advance.

This type of Mushroom title or an entity card title?

type: custom:mushroom-title-card
title: Stromverbrauch heute

or this…

This will be necessary either way. I would need a little more info on the energy-date-selection entity to get the template correct.

An example…

type: custom:mushroom-template-card
primary: |
  Stromverbrauch vom {{ now().strftime('%m-%d-%Y') }}
secondary: secondary info
icon: mdi:home
icon_color: red