!= in automation

Hey there! I need to exclude one state in my automation. How should I write != in yaml?

Here is an example from my config.

if your condition is related to the state of the trigger, this condition will work with a state trigger. It will not work with any other type of trigger:

  condition: template
  value_template: "{{ trigger.to_state.state != 'XXXXXX' }}"

Otherwise you’d need to hard code the entity_id like @silvrr example.

Thank you! I needed it in condition and @silvrr template worked :slight_smile: