How does this work for you? Seems to me that’s what user panhans uses in:
To detect a TRV’s physical change, these lines does the job (5 seconds and context conditions):
# trigger
- platform: state
entity_id: !input input_trvs
attribute: temperature
for:
seconds: 5
id: comfort_change
# further condition
- condition: template
value_template: "{{ trigger.id == 'comfort_change' and input_temperature_comfort != none and trigger.to_state.context.id != none and trigger.to_state.context.parent_id == none and trigger.to_state.context.user_id == none }}"