im trying to create a automation with my google calendrer that will check the next day, to see if my kids do not have a holiday active. I created a toggle helper that will turn on or off depending on the state of the calendrer. I tested the automation and it did not work. I wanted to get help to see what did I miss with my automation: Yaml:
not sure for end event I want if there is no holiday to to turn off the toggle. Also if there is a holiday it turns off the toggle when the holiday ends?
An all-day event starts at 00:00 on the day of the event and ends 24 hours later at 00:00of the next day.
That means your automation will turn on the Input Boolean 20 hours before the holiday event and turn it off at the end of the next day. In other words, the Input Boolean will be on for 20 + 24 = 44 hours.
Yes, that is it. Example would be labor day coming up on sept 9. the calendrer will check on Sunday and turn the toggle on due to labor day being on Monday. then check on labor day off for next day and if no holiday/event. It will turn toggle off
Your automation doesn’t “check” the calendar for anything. Your automation is triggered by events in your calendar. If an event exists, it will be detected by your automation’s two Calendar Triggers. If there’s no event, the automation is not triggered.
I asked chatgpt for a automation and it came up with this but i get a error on this one?
Triggered manually at August 15, 2023 at 6:15:42 PM
Call a service 'Input datetime: Set' on
Call a service 'Calendar: List event' on automation.check_calendar_events
Stopped because an error was encountered at August 15, 2023 at 6:15:43 PM (runtime: 0.06 seconds)
Script requires 'response_variable' for response data for service call calendar.list_events
I thought your original problem, in your first post, has been solved by simply making the offset value negative. However, now you’re posting more non-functional automations. What’s your goal here?
i wanted to create an automation to check if kids google calendrer has a event the next day. if there is a event turn off toggle and if there is no event turn on toggle i made. That way I can just make a simple automation for the toggle.
That’s exactly what the automation in your first post does. The only mistake it contains is that you used a positive 20, instead of negative 20, for offset.