Automation half an hour before alarm

https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371#oneone-format-it-properly-16

Does your input_datetime contain just a time or a date and time?

Time only:

{{ now() > today_at(states('input_datetime.alarm')) - timedelta(minutes = 30) }}

Time and Date:

{{ now() > state_attr('input_datetime.alarm','timestamp')|as_datetime|as_local - timedelta(minutes = 30) }}