Setting up a particular day as condition

Hi, I know there re a lot of questions about that, xmass mode on heheh, thwe point is I can´t figure out how to do this.

the time-date helper works, but only for the next xmass day, the calendar option, I won´t be able to make it work, too criptic for me.

the only thing I want is an automation which runs every day, to not run on 12/24 and 12/31 days.

any suggestion, please?

You can use a template condition
{{ not (now().month == 12 and now().day in [24, 31]) }}

1 Like

If you use calendar, then add an action on the date “turn off automation” next day an action “turn on automation” (i dont use calendar so i dont know)

or use “conditions” in ur (another) automation ( same as above 1 day(or hour-day) “turn off” next day “turn on”

Schedule light color based on holidays - #15 by 123

ahh seems vic4news beated me with an “edited version”

Another path is the workday integration

1 Like

Use the Time & Date integration:

hi there, thank you all for your answers, dunno what answer mark as solution, as there are several

I think I could use this, seems easy to implement, thank you

How can I create an action? I konw you said you don´t use calendar, if someone could explin this, would be nice.

I tried the helper, the problem is you can´t make it repeat, so it would work next set date only. Unless there is a way to do that

First of all,it doesn’t help that just partly describe what you have and want(well this is pretty clear)
So do you have an automation already for your Xmas-light-mode Or ?

If so you can make an additional automation to stop Xmas-light-mode running on 24/12 an 31/12
(whether it’s a light, scene or an automation)
ie.

  • if Xmas-mode on and(condition) date 24/12 or 31/12 , Action: turn of xmas-mode-automation/scene/light
  • if Xmas-mode of and(condition) date 25/12 or 1/1 , Action: turn on xmas-mode-automation/scene/light
    above is 2 basic examples and description of a structure of an automation or template

There are tons of examples here in this forum, but i wont direct you to anyone(again), as i assume you are able to use the search function your self
When you find something and or have something to show which you need help with, then post your code(correctly cording to the forums directive) read first(Top) posts.
PS: i noticed the UI in Settings-Automation is slightly changed, so you are better of starting with some basic template/automation examples, and playing around And Read is the keyword, and if you want to add calendar event as a trigger, you first have to create and event , othervice youd be better of creating a template-trigger

Hi, well I didn’t describe the automation I have because I didn’t know it mattered, as the only thing I wanted to do is add a condition to it to prevent it to run on a certain day. Anyway, here it is

as: "Apagar luces salón "
description: todas las luces del salón
triggers:
  - trigger: time
    at: "00:30:00"
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
      - sat
      - sun
conditions:
  - condition: template
    value_template: "{{ not (now().month == 12 and now().day in [24, 31]) }}"
actions:
  - action: light.turn_off
    metadata: {}
    target:
      area_id: salon
    data: {}
mode: single

As you can see I have added the template option as condition, and it works.

The point of keepIng asking is just curious about calendar event you mentioned, as I strugled to make it work and never suceeded, just that.

Anyways, as you explain, what I don’t understand is the point in creating two aditional automations to stop and start the previous one…

Isn’t it the same adding a condition, and simpler?

And also, what I don’t get, and here comes the curiosity thing, how do you use a calendar event?, because I previously said I am unable to use it. The first thing I did was to create an event in the local calendar for all day on 12/24 but i found no entity to use, that is the primary doubt.

For the rest, yes and thank you, I am able to use the search function, which I did.
Sometimes you search, you write down a word or sentence which shows results not according to your needs. And you replace them to get a better result, somtimes you get what you want others you don’t. That’s why I am asking here.

Well that was “premature” thought from my side as i got the impression that your experience with automation/templates was very low, based upon your “lacking of relevant information and facts” in you initial Topic description.

And first now you say you have a working automation, With a working condition. (with the help of suggestions here) Would have been a good idea saying i.e "it works now , thanks to …) and then open a new Topic in regards to Calendar i.e “Use Calendar to trigger an action”, If your point was focused about learning Calendar ( ofcause after you’ve been reading official docs about Calendar, and searched in the forum, i.e use an event to trigger an action/run a template/automation/scene )

You solved your Topic here, ( I assume you have tested it, so you doesn’t get surprised on xmas eve :slight_smile: )Please mark a post as solution and open a new Topic

1 Like

well, you are right, I may open another topic on calendar events, I wanted to take advantage of every answer to this topic but certainly I think the condition I learnt from above will help, at least I tried a test automation yesterday changin days, obviously, and it worked.

thank you

1 Like

Yes im sure there is more “confusions/struggles” in regards to the Calendar integration (as mention i don’t use it so im not aware of the “progress in development” of this integration) But i encourage You to Open a Topic with your thoughts and ideas of using Calender, it might eventually lead to more extensive UI features in that component :grin:
And The UI "features of i.e Automatons/scripts etc is also limited to not make it to complicated for most users
I’ts my impression that one still won’t get around not using Templates if one want to use the Calendar to execute various actions, which leaves us to focus on learning/understanding Templates :slight_smile:

Good luck