Help requested - Thermostat, Valve control

Hello Guys.
I need some help. I can’t configure the thermostat as it is installed.
It is a Tuya thermostat, It’s integrated OK.

It’s supposed to control a shelly (that controls a valve) but I can’t do it with a thermostat.
Basically, what I want to do is turn on the valve when “current_temperature” is lower than “temperature” (the set value)
With automation, I can’t compare the two values because they are not entities. These are attributes of the entity climate.oficina

  - "off"
  - heat_cool
  - heat_cool
min_temp: 5
max_temp: 95
target_temp_step: 0.5
  - program
current_temperature: 21.5
temperature: 30
preset_mode: null
friendly_name: Oficina
supported_features: 401

Any Ideas?


Here’s a trigger for you.
I casted them to float but that may be unnecessary… I did it in case they were strings. try without the | float , but add back if needed…

  - platform: template
    value_template: |
      {{ state_attr('climate.oficina', 'current_temperature') | float <
         state_attr('climate.oficina', 'temperature') | float }}
condition: []
action: []

also remember that triggers happen when it goes from being false to being true… so if your current temp is already below (as your sample shows), it won’t trigger when you add this automation. (Because it’s true already… not changing from false to true).

Perfect! That was it. It worked flawlessly