How to show the last time the CAR had been "online"

I am using a meatpi WiCan dongle in a golf to get the SOC, range and odomoeter from the control units.
That is working fine.

Then there is a sensor provided by WiCan called GOLF_STATUS which is “online” or “offline” which you can here

I am looking for a sensor which is showing the last time it was online, I mean date and time.

I had tried a solution with a template sensor which did not work out

  - platform: template
    sensors:
      golf_ankunft_abfahrt:
        friendly_name: "GOLF - ANKUNFT / ABFAHRT"
        value_template: "{{ state_attr('sensor.golf_status','online') }}"
        device_class: timestamp

After reboot the sensor got the state unknown and that stayed even though the car left the garage and transmitted all the data like SOC, range and odometer.

Any suggestions for such sensor and how to display that nicely ?

Thanks a lot

SOLVED this way

- type: markdown
    content: >
      {% if is_state('sensor.golf_status','online') %} {% set zuletzt = (now())
      | as_timestamp | timestamp_custom('%d.%m. %-H:%M') %} {% else %}  {% set
      zuletzt = (states.sensor.golf_status.last_updated) | as_timestamp |
      timestamp_custom('%d.%m. %-H:%M') %} {% endif %}

      # {{ "{0:_.0f}".format(states('sensor.golf_km_stand_permanent') | int) |
      replace("_",".") }} km {{ zuletzt }}

adding the last line with odometer and date time
Not a beauty but it works as planned.

This will be updating even though nothing has changed except the time as long as the car is online.