The problem is the 'me' you've used in your turn_on-function.
Maybe this was done by mistake since you already created an entity-pointer and set it properly ('t_trigger').
However, you still used me in ent_animate() but the me-pointer is invalid here because it's a different function than the entities' action.
Replacing the 'me' with 't_trigger' should do the trick aswell.