I created an automation that uses a sentence (What’s the Temp") with my Home Assistant VPE. When I ask it What’s the Temp, it just says “Done” and doesn’t do/say anything else. I’m really confused. When I look the Traces, it says “climate” is undefined.
This is the action portion of the automation. A screenshot of the traces is below along with a screenshot showing my development tools (to show the name of the thermostat).
set_conversation_response: >
The current temperature is {{
climate.t6_pro_z_wave_programmable_thermostat.current_temperature }}.
You need to use an appropriate function to extract the desired value from the state object. As far as we can see from the provided example, you are requesting the value of a non-existent variable.
Thanks! I was able to get it working. For anyone who comes along looking for similar, here’s the final output.
The current temperature is {{ state_attr('climate.t6_pro_z_wave_programmable_thermostat','current_temperature') }} degrees.
Here’s the final version for anyone who’s interested. I am transitioning from the Google Assistant environment and trying to reproduce some of the things it did that I actually like. My thermostat has four mode options:
heat_cool (set a high temperature so that temps above this will cause the AC to turn on and set a low temperature so that temps below this will cause the heat to turn on)
off
heat
cool
The current temperature is {{ state_attr('climate.t6_pro_z_wave_programmable_thermostat','current_temperature') }} degrees and the thermostat is set {% if states('climate.t6_pro_z_wave_programmable_thermostat') == 'heat_cool' %} to Heat Cool to keep the temperature between {{ state_attr('climate.t6_pro_z_wave_programmable_thermostat','target_temp_high') }} and {{ state_attr('climate.t6_pro_z_wave_programmable_thermostat','target_temp_low') }}.
{% elif states('climate.t6_pro_z_wave_programmable_thermostat') == 'off' %} to off.
{% elif states('climate.t6_pro_z_wave_programmable_thermostat') == 'heat' %} to heat to keep the temperature above {{ state_attr('climate.t6_pro_z_wave_programmable_thermostat','temperature') }}.
{% elif states('climate.t6_pro_z_wave_programmable_thermostat') == 'cool' %} to cool to keep the temperature below {{ state_attr('climate.t6_pro_z_wave_programmable_thermostat','temperature') }}.
{% endif %}