Subtract one day from mqtt date string

Hello,
i get an mqtt date string in the format : dd.mm.yyyy.
Now I would like to subtract one day from the day (dd), f.e date-string is 12.07.2024 and it should be 11.07.2024.
If possible, it should also work at the turn of the month.
Is there a way to do this?
Thanks in advance
Wolfgang

Here is an example template that will subtract 1 day from an input_datetime entity:

{{ (states('input_datetime.only_date') | as_datetime) + timedelta(days=-1)}}