Automation based on Google Calendar - how to do it?

I’m trying to use a Google calendar event to control automation and cannot figure out how best to do it. Specifically: I have outdoor lights controlled by a Wyze smart plug at my vacation rental, but I don’t want them to turn on if the rental is vacant. My Google calendar syncs with Airbnb and has an “event” during all reservations.

How do I create an automation to either (a) turn on the lights only if there is an event on the calendar at sunset everyday, or (b) use a routine to turn on the lights daily and then use the automation to turn OFF the lights each day if there is no event in the calendar.

I’d love some help! Thanks.

Welcome to the Forum, @orrin.franko! :wave:

Have you looked at IFTTT? Using the free plan in the past, I’ve had Wyze Bulb Colors turn on in response to weather changes (for instance, turning blue when an overnight freeze is predicted). I imagine that might be one of the easiest tools for accomplishing what you described.

Not yet. Before introducing a new system and potentially a new subscription into my automations, I wanted to see if anyone has found a way to do it natively or using the Google Home app.

I’m unaware of any way to make Google Home consume data from Google Calendar and use that as an Automation Starter, though it’d be cool if it did, and it seems like something Google should probably do. A quick search indicates that people have been asking about that sort of thing on Reddit for a while, and a lot of the solutions seem to involve IFTTT. There are probably others that work just as well or better, but that one’s been pretty easy for other applications, in my experience.

I understand wanting to keep things simple, too. More complexity has the potential to add more problems (and more things to manage).

If someone else chimes in with a better solution, I’ll be very interested.

It turns out that IFTTT also doesn’t allow a Trigger to simply “check” the Google Calendar availability - it has to trigger on the start of a new event. But thanks to ChatGPT I elected to try using a Google Script in Google Sheets to query the Calendar at a defined time each day and use IFTTT to Trigger when there is a new line on the Google Sheet. In theory, this will work and actually allows me to use the Free IFTTT instead of the Pro version that was needed for Google Calendar integrations.

I’ll know over the next week if it was successful.

1 Like

Oh, that’s cool. Thanks for taking the time to post the update! I hope it works. :crossed_fingers:

Your mention of scripting (and previous mention of Google Home) also makes me think of Google Home for web, which has a scripting facility if you enable Public Preview. I haven’t spent any real time with that yet, but I think it’s supposed to allow some Automations capabilities that aren’t available in the app. I don’t know if that includes access to Google Calendar and the ability to trigger off that or not, but that could be another place to look if the thing with Sheets doesn’t work out as you hope. (I hope it does, though.)