WTH Isn't There a "Date" Automation Trigger/Condition?

There are time based events, but why must I create a custom helper to get a date to run in automations or conditions?

Automation for Christmas Lights:
“On December 25th do…”
“If Lights turns on, and today’s date is December 25th do…”

Automation for Hanukkah Lights:
“After December 25th and before January 2nd do…”

Use calendar integration?

1 Like

Date condition is in the works, I remember a PR going through the system. If I recall correctly, it’s going through reviews as we speak.

5 Likes

I was looking to post almost the same WTH, but I was looking for a solution that is much more intuitive than just a date, for example trigger on the 4th Thursday in November - right now I have to hard code a date in a value template, which means I have to touch that automation once a year.

Local calendar can do that

WTH- I can trigger an event by day of the week, time of day, sunrise/sunset, etc. But if I want to set my Xmas scene on Dec 1 I have to be an engineer. Please make calendar dates as easy to use as day/time!

I believe this is shipping this Wednesday in 2024.12

Oh where do you see that?

Could be wrong about ship date.

Maybe you want a conditional Sections card to only appear during a certain month. E.g., Christmas stuff to only appear during Christmas time. It would be great if we could select an exact date or month just as easily as we can select days of the week.

How? Please point me in the right direction.

Use the Holiday integration to create a calendar entity with the holidays you are interested in.

Then create an automation using a calendar trigger, and select that newly-created calendar entity.

Then add a template condition using the calendar trigger variable to check if the event is thanksgiving, using a template like this:

{{ trigger.calendar_event.summary == 'Thanksgiving' }}

Edit: this was in response to @RickFurtado and @mwjones71

Edit #2: before anyone assumes I’m suggesting this WTH is not valid, that is not my intent. I’m simply showing there exists a method to do this already; I’m not saying it shouldn’t be simpler. And, also, anything can be done using templates, but that is another method that many will think is even more complicated.