UK Bank Holidays

Having been woken (again) by my Monday morning routine piston firing (Blinds, wake-up lighting, Google Home music alarm on a Bank Holiday (UK national holiday) I had a go at writing a piston that could work out if today is a Bank Holiday (England/Wales, Scotland and N.Ireland)

I found a great piston on the Webcore forum for calculating Easter Sunday, but that only needs to run maybe once a year, so I kept that separate, and used it to set a global variable (@easterSunday).

Not sure if this is the right place for it - wanted to share, but also enjoy the feedback of where I've gone wrong/could improve.

Below version just sets a variable for now.

Easter Sunday
link to forum post


Thats interesting. Another solution is to use the GCAL integration. This allows you to search for entry’s in your google calendar, you can then set a virtual switch and use it in your pistons. If you add a bank holiday calendar to the google calendar, you can search out the bank holidays and set the switch.
I use this to set an away switch, when I’m on holiday. This is then used by various pistons to do different things to when were home.


Yes, I looked into this - and I like it for it's ability to be flexible - I was concerned that if access is removed/charged for/ads inserted in the future, and also because I'm not an enormous gCal user, which means another thing to maintain - I wanted to see if I could get an on-hub solution.

Hello I am the owner of the community GCal integration. I started using it 7/8 years ago when I was in SmartThings and then moved to HE 6 years ago and took on maintaining it here. Google hasn’t changed much with their APIs so hopefully that continues.

You don’t have to be. At least in the US Google maintains a United States Holidays calendar that I leverage for similar use case. I would expect a similar calendar for the UK. You can confirm by logging into your Google calendar. If it’s there then the GCal Search app can query it for holiday matching.

1 Like

Hello, and thank you for the reassurance - much appreciated. I'll take a deeper look.

1 Like

There is a uk public holiday calendar for google, I use, think this is the url

1 Like