Access the temperature value from a climate entity

Had lots of trouble with this too. Was trying to get current temperature value out of climate entity for things like lovelace and Grafana. This template sensor worked great. Thanks mate.

I got the same problem, i have some tuya thermostat and i can only see on state badge the state of thermostat , like heating or cooling, it doesnt show me the current temperature.
I have tried this and still nothing :frowning: any ideea?

  - type: state-badge
    entity: climate.termostat_bucatarie
    unit_of_measurement: °C
    value_template: '{{ state_attr(''climate.termostat_bucatarie'', ''current_temperature'') }}'
    style:
      top: 44%
      left: 36%
      transform: scale(0.5,0.5)
  - type: state-badge
    entity: climate.termostat_casuta
    style:
      top: 55%
      left: 54%
      transform: scale(0.5,0.5)

I was looking to do the same - thanks @sd_dracula

That’s what I use:

living_room_temp:
      friendly_name: Living Room Temperature
      unit_of_measurement: '°C'
      value_template: "{{ state_attr('climate.living_room', 'current_temperature') }}"
1 Like

I use exactly the same code and it works perfectly - thanks again @sd_dracula

nobody knows how can i display the current temp on HA? not the MODE?

Thanks guys for your advice. Here an working example with the “new” template sensor. Thermostat is a Meross MTS200.

template:
  - sensor:      
      - name: "Temperatur Wohnzimmer"
        unique_id: "template_sensor_temperatur_wohnzimmer"
        state_class: measurement
        device_class: temperature
        unit_of_measurement: '°C'
        state: "{{ float(state_attr('climate.thermostat_wohnzimmer', 'current_temperature')) | round(1) }}"