Hi, In an automation script i am trying to set a input number with the temperature from an climate entity (caller heater).
To take a number from an input number i would use: ‘{{states.sensor.heating_target_temperature.state}}’
So i would assume i would use ‘{{states.climate.heater.temperature}}’ to use the current temperature of the heater, but this does not work. I have tried many variation, but with no joy.
At least in my case (a Nest Thermostat), the temperature attribute is the target temperature, whereas current_temperature is, well, the current temperature.
So, assuming you want current temperature, you can do as @bradyn12 suggested, and use '{{ states.climate.heater.attributes.current_temperature }}', or you could use '{{ state_attr("climate.heater", "current_temperature") }}'.
First ignore all the above - they should be using states(device) or state_attr(device,attribute)
If you want the current state of a climate entity it is states('climate.my_climate_device') if you want to know if it is ACTUALLY heating or cooling rather than just what state it is in that’s state_attr('climate.my_climate_device','hvac_action')