Can't get this trigger to work

I’m trying to detect when my HVAC fan has been idle for 90 minutes. I’m trying this but I’m getting an invalid configuration:

 trigger:
    - platform: template
      entity_id: climate.trane_model_tzemt400ab32maa_cooling_1_6_2
      value_template: '{{ state.attributes.fan_state == "Idle" }}'
      last_changed: '01:30:00'

I’ve loaded the template tool and entered ‘{{states.climate.trane_model_tzemt400ab32maa_cooling_1_6_2.attributes.fan_state }}’ this reports back the expected Idle so I’m pretty confident that I’m getting this part right but I lack the skill to format the trigger properly.

Any ideas?

I have lots of trouble getting template triggers to work for me. But I’m not sure you’ve got the format correct. For the value_template to work, I believe it needs to function on its own - so you prob want something like states.climate.trane_model_tzemt400ab32maa_cooling_1_6_2.attributes.fan_state.

Also - does “last_changed” work with template triggers?

What I’ve done in cases where I couldn’t get the trigger to work is to set up a template sensor, then use a trigger to watch its state for my automation.

2 Likes

Hey I think we have similar problem (monitoring the sensor state), and I think this can be solved with the Feature Request I raised several days ago.

Would you please have a look, and please vote if you are thinking the same :slight_smile:

Wow, that was easy. I’m getting it to load without error so I’m pretty sure it will run now. Thanks for the help!