Show a timestamp of device event?

I have a variable configured in configuration.yaml and I show it like this:

type: vertical-stack
  - type: entities
      - entity: input_boolean.snail_mail
        name: Finns det post i lådan
        secondary_info: last-updated
        icon: mdi:mailbox-up
    state_color: true

The problem is that everytime HA is restarted, like on a update, the “last-updated” is reset which is misleading for me.

I have this automation:

alias: Turn on mailbox variable if vibration detected on lid
description: ""
  - type: vibration
    platform: device
    device_id: xx
    entity_id: xx
    domain: binary_sensor
condition: []
  - service: input_boolean.turn_on
      entity_id: input_boolean.snail_mail
    data: {}
mode: single

Is it possible to add a secondary entity that shows the last time the vibration sensor was vibrating?

I did manage to get this input_datetime working, I set it from an automation. However the card shows it as an input…I would like to only show the timestamp in the frontend.