Hello! I created a new automation yesterday to remind me on September 14 to schedule to record a new season of show premiering on September 14, 2026. The reminder will a “tts_say” to my Homepod. I wasn’t able to find a way to enter a specific date to trigger in the automation using the UI automation editor. I was able to find a “value_template” that has to be coded in YAML. I was able to code it correctly in YAML. Is my code correct? Thanks in advance.
alias: Test Date Trigger
description: ''
triggers:
- trigger: template
value_template: '{{ now().date() | string == ''2026-09-14'' }}'
BTW, I tried to post this in Reddit r/homeassistant but it was immediately removed, which I don’t understand!
As long as you understand that the trigger is going to fire just after midnight…
Few people actually want to trigger an automation based solely on a date changing, mostly they want it to fire at a specific date and time. For one-off events you would probably be better served by adding a calendar event or a To Do and triggering off either of those.
Thank you for your suggestion but I haven’t used either calendar or totolist! I will just continue what I learned on the “value_template”. I now have a good example to copy from if I need another specific date trigger in the future.
Yes, the date is triggered right after midnight but I have added a condition at specific time range during the day to fire up rest of the automation.
That’s not how Conditions work… Conditions do not wait, they are checked immediately after the trigger fires and if they fail, the actions aren’t executed.
Well, I’ll post the entire YAML code and see what I mean for the “specific time range during the day to fire up the rest of the automation”. Please let me know if this will work or not. Thanks.
alias: Wheel of Fortune Premiere Day
description: ''
triggers:
- trigger: template
value_template: '{{ now().date() | string == ''2026-09-14'' }}'
conditions:
- condition: or
conditions:
- condition: time
after: '07:00:00'
before: '07:01:00'
- condition: time
after: '12:00:00'
before: '12:01:00'
actions:
- action: tts.say
metadata: {}
data:
cache: false
entity_id: media_player.homepod
message: Tonight maybe the premiere of Wheel of Fortune. Check the TV Guide.
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- action: tts.say
metadata: {}
data:
cache: false
entity_id: media_player.homepod
message: Tonight maybe the premiere of Wheel of Fortune. Check the TV Guide.
- delay:
hours: 0
minutes: 2
seconds: 0
milliseconds: 0
- if:
- condition: time
after: '12:00:00'
then:
- action: automation.turn_off
metadata: {}
target:
entity_id: automation.wheel_of_fortune_premiere_day
data:
stop_actions: true
mode: single
It won’t work. The trigger will fire on 2026-09-14 at 00:00:00 (or a few milliseconds later) & the automation will be blocked because the conditions don’t match.
Just go create a calendar entry on the 14th Sep at 07:00 (and additionally at 12:00 if you want), then change your automation trigger to use the calendar event.