Create a new entity of type temperature sensor

Hi, I have read various suggestions on how to create a new entity of type temperature sensor, but I have not succeeded.

  sensor:
  - platform: template
    sensors:
      temperatura_soggiorno:
        friendly_name: "Temperatura del soggiorno"
        unit_of_measurement: "C"
        value_template: "{{ state_attr('climate.bht8000gc_thermostat_c','current_temperature') }}"

the test done by models is ok, the yaml file is ok, i restarted the system, but nothing to do. the new entity is not created. advice?
Thank you

review indentation as per the doc, this is quite sensitive

sensor:
  - platform:....
    sensors:
1 Like