Change card title based on date


Can someone please help me, I am trying to create a card where the title changes based on the date 2 and 3 days from now eg
Todays date is 08.09.23
Card Title: Sun 10th
card Title: Mon 11th

I did it this way to show the day after tomorrow - so all you need to do is change the number of hours :

{{ (as_timestamp(now())+(60*60*48))|timestamp_custom('%A') }}

The card should have a templates support for a title.

There are at least two options:

  1. Assume you need a Entities card with a dynamic title. Then place this card into custom config-template-card (CTC) and then set any option dynamically. Go to a dedicated CTC bread for details.
  2. Or you may place a markdown card (which does support templates) into a stack with your card. Some custom stack cards like stack-in-card allow ro stack cards in a “seamless” way. Then style the markdown card by card-mod to look it similar to a native title.