Trigger Id in templates

Hello,
Is there a way to set trigger-id?
The code below doesn’t work.

{% if('sensor.sunrise_time') > ('06:15:00') %}
{{states.state.trigger_id,('on')}}
{%else%} 
{{states.state.trigger_id,('off')}}
{%endif%}