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:
condition: template
value_template: "{{ trigger.to_state.state != 'XXXXXX' }}"
Otherwise you’d need to hard code the entity_id like @silvrr example.