Extracting Temperature from Climate entity in Template sensor UI

I have a salus thermostat and the climate entity works great but I’m trying to create a helper to show the temperature, humidity from the climate entity. I managed to get this working from configuration.yaml but would like to get this working in the UI if possible…

This works in configuration.yaml

  # Temperature from entity
  - platform: template
        friendly_name: "Bathroom Temperature"
        unit_of_measurement: "°C"
        value_template: "{{ state_attr('climate.bathroom_8b', 'current_temperature') }}"

With the following in the template sensor, I get the error below

      value_template: "{{ state_attr('climate.bathroom_8b', 'current_temperature' ) }}"
      unit_of_measurement: '°C'
      friendly_name: 'Bathroom Temperature'

Sensor None has device class ‘temperature’, state class ‘measurement’ unit ‘°C’ and suggested precision ‘None’ thus indicating it has a numeric value; however, it has the non-numeric value: ‘bathroom_temp: value_template: “19.5” unit_of_measurement: ‘°C’ friendly_name: ‘Bathroom Temperature’’ (<class ‘str’>)

If I go into developer tools it lists these Attributes for the entity
hvac_modes: off, heat, auto
min_temp: 5
max_temp: 35
preset_modes: Follow Schedule, Permanent Hold, Off
current_temperature: 19.5
temperature: 19
current_humidity: 61
hvac_action: heating
preset_mode: Permanent Hold
friendly_name: Bathroom (8B)
supported_features: 401

Only the template goes in the “State template” field. There should not be any YAML configuration in that field: