Strava last date activity motivation

I have been using the Strava integration and love it.

I’m needing a bit of motivation to get up and go in the morning so I have set up an automation for my Google Home to let me know the weather and also the last time I ran and what disance.

I am having a problem with the date element of this.

The sensor that shows the last date and time is sensor.strava_0_0 (friendly name).

So I first added this to TTS:

Your last running day was on the {{ state_attr('sensor.strava_0_0', 'friendly_name'}}

But my Google Home read it out wrong. Ten point zero eight blah blah blah

So I then tried creating a sensor

 strava_last_date:
         friendly_name: strava last activity
         value_template: "{{ state_attr('sensor.strava_0_0', 'friendly_name') }}"

and splitting it:

Your last running day was on the {{states.sensor.strava_last_date.state.split(".")[0] }} of {{states.sensor.strava_last_date.state.split(".")[1] }}  with a distance of {{states.sensor.strava_0_3.state}}

But this also gets read out kind of wrong.

How can I convert my sensor (sensor.strava_last_date) to a date? Once I get it into a date I could then start playing around with TTS saying ‘Your last running day was’ yesterday, or 2 days ago ect

Much appreciated if someone could give me a hand.

There is no built-in strava app, so which custom integration are you using? The one I found doesn’t seem to place date/time inside the friendly_name of any sensor.

Yes, the custom Strava integration I am using: GitHub - codingcyclist/ha_strava: Pipe your Activity Data from Strava directly into Home Assistant

It seems the State for the activities is the name given in Strava and the friendly_name has the date and time of the activity - my last activity this morning is showing the date and the time in the friendly_name: 10.08. - 08:17