Momentary switch not updating last_updated or last_changed

I have a momentary switch to boost the heating, I would like to know the time lapsed since the last boost to prevent a boost again in a certain amount of time, say 30 minutes.

The switch code i’m using is:

switch:
  - platform: template
    switches:
      heating_boost:
        friendly_name: 'Heating boost'
        icon_template: mdi:thermometer-plus
        value_template: "{{ false }}" 
        turn_on:
          - service: climate.set_temperature
            data:
              entity_id: climate.home
              temperature: "{{ states('sensor.l_temperature')|float+0.1|round(1) }}"
        turn_off: []

The switch works well but when trying to get the last_update or last_changed attribute its not been updated.
Ive since found out that the state doesn’t appear to changed to ‘on’ and stays ‘off’ in developer tools when activating the switch.

I thought of doing this through an input boolean setting it in the switch turn_on and unsetting in the switch turn_off section of the code but wasn’t sure how to incorporate that in the code and whether it would work.

There must be a way around this which is why i’m asking for help here.

Try with the value_template removed

As @francisp said, remove the value_template.
To keep your momentary switch function, turn the switch off after you run the script.

switch:
  - platform: template
    switches:
      heating_boost:
        friendly_name: 'Heating boost'
        icon_template: mdi:thermometer-plus
        value_template: "{{ false }}" 
        turn_on:
          - service: climate.set_temperature
            data:
              entity_id: climate.home
              temperature: "{{ states('sensor.l_temperature')|float+0.1|round(1) }}"
          - service: switch.turn_off
            entity_id: switch.heating_boost
        turn_off: []

Thanks guys, I tried them both but:
@francisp your idea worked but stopped the momentary action of the switch making it a toggle.
@jazzyisj your idea still didn’t update the last_update or last_changed attribute.

Ive ended up creating a input_boolean and adding

- service: input_boolean.toggle
  data:
   entity_id: input_boolean.heating_boost_trigger

to the turn_on section and use the last_update or last_changed attribute of the input_boolean.

i.e.

switch:
  - platform: template
    switches:
      heating_boost:
        friendly_name: 'Heating boost'
        icon_template: mdi:thermometer-plus
        value_template: "{{ false }}" 
        turn_on:
          - service: climate.set_temperature
            data:
              entity_id: climate.home
              temperature: "{{ states('sensor.l_temperature')|float+0.1|round(1) }}"
         - service: input_boolean.toggle
           data:
             entity_id: input_boolean.heating_boost_trigger
        turn_off: []