Trigger using input_datetime with time offset

Templates are not supported everywhere. The majority of the different types of triggers and condition do not allow templates.

If you want to use a template like that, to calculate a time for a trigger you need to use a Template trigger (as demonstrated above by Colton). Though I would suggest using the following simpler version:

{{ now() >= states('input_datetime.yphone_alarm')|as_datetime|as_local - timedelta(minutes=20) }}

However, as long as your offset is static, you would be better served using the built-in offset attribute (added in 2024.9) that Pete has linked to.