Template with thermostat Moes

Hello
I have a thermostat Moes BHT-002-GCLZB. The local_temperature: Current temperature measured on the device (in °C). Reading (/get) this attribute is not possible.

I want use this “value” in statistic card.

Someone says me to try with a template. (The first sensor is for another device)
I have

template:
  - sensor:
      - name: delayed_return_date
        device_class: timestamp
        state: "{{ (states('input_datetime.date_retour') | as_datetime | as_local + timedelta(hours=23)).isoformat() }}"

      - name: salon_local_temperature
        unit_of_measurement: °C
        state: "{{ state_attr('climate.thermostat', 'local_temperature') }}"

In the box for template test i have the good value of tempearture.

But it’s not usable in static card because it doesnt’ appear

An another solution?
Thank’s for your help

You need to add state_class: measurement.

State Classes

thank’s for your help
It seem to work

Also please read the category descriptions. Community Guides was not appropriate so I have moved this.