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 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') }}"
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) }}"
Hello, for an air conditioner this “current_temperature” is the room temperature, not the “set” temperature, is that right? How to I read the “set temperature” of an air conditioner?
I’m trying to set up a Temperature sensor, but getting a String vs Number error - can anyone advise?
edit. I’m a plonker - stray quote
I find it kind of sad, that we all have to look up here how to access our data, which we already have within home assistant.
I just wanted to generate a history graph of the current temperature.
my climate “entity” is in reality a “device”, which could have multiple entities like “set temp”, “current temp” … why start 1 level to low?