Mqtt, now(), How to get time only once


I am trying to make mailbox notification using Arduino and Mqtt.
It works fine but I want to know when the mail is received.
If I use now() it will keep updating time on dashboard so if I receive mail at 9:00 and look at the dashboard at 11:00 it will show mail received at 11:00.
Is there a way to manipulate the data from mqtt before it reach the dashboard or another way to do this?
I use MQTT Sensor - Home Assistant


I have solved it my self. I wrote the following in my mqtt config:

  - state_topic: "/Arduino/Mail"
    name: "mqtt_arduino_mail"
    value_template: >-
      {% if value == "Mail received" %}
        {{ "Mail received"}} {{now().strftime('%d' '/' '%m' '-' '%y' ' ' '%H' ':' '%M')}}
      {% elif value == "No mail" %}
        No mail received
      {% else %}
      {% endif %}