Template presence sensor - does not listen for events

what am I doing wrong?

{{ is_state('person.andrea', 'home') }}