Did you check if this works? Triggers are affected by limited templates and is_state is in that list.
You may have re-think this a bit.
I suggest triggering on the sensor changes alone, and use conditions block and/or choose to pull in your logic.
Automations #2: the condition block.