Scheduling in HA - Schedule Helper? Sensors? Best Approach?

First, let me say that I’m hesitant to ask this question because I’m sure that the essence of my question has been answered many times over. That said, I’ve done quite a bit of research on this before asking, and the reason I’m asking is because I’m really seeking some advice from some of the more experienced HA users here…

See, I’m relatively new to Home Assistant. Or at least the more complex parts of Home Assistant anyways. I’ve used HA personally at my home for simple things for quite some time but I’m now in the process of moving my small business from Indigo (a Mac based Home Automation software) to Home Assistant. I have a fairly complex setup in Indigo (controlling lights, climate, media, IR, and external apps) and I’m moving pieces of that to Home Assistant as I can. However, I’m really stuck on the best way to do the pretty basic scheduling tasks that are really the most essential part of the whole process.

This is my scenario: Like most businesses, we have set business hours every week. Those are different on certain days but by and large, they stay the same. There are two complicating factors here: 1) this is a bar, so our opening hours span over midnight and 2) on occasion I would like to be able to open earlier or later without a lot of difficulty. So far, I’ve got a schedule setup using the schedule Helper, but I’m not sure if this is going to be ideal.

As far as the automations are concerned, there are really four main day parts that I want to accommodate which I will try to explain.

  1. Pre-opening: when the staff shows up, all of the lights come on, the HVAC starts to bring things down to the operating temperature, and things start to come up to their working states)

  2. Open: when all of the lights go to their normal dim positions, certain media starts to play, etc.

  3. Last Call: (or Pre-Close): All lights go back to full on, some things start to shut down (TVs, music, etc), HVAC goes to standby mode

  4. Close: All lights go down and everything goes into standby until the next day.

The ideal scenario here would probably be if I could just setup a calendar (or even a Apple or Google calendar) that could define the actual operating hours and then everything else could be based off of that, but I’m not quite sure how this is best accomplished. I have kind of been going down the road of binary sensors to define the day part based on the schedule, but I just don’t feel like I have enough experience with this platform to make smart choices. Part of my issue here is that there seems like there are about infinity number of ways to address this in HA where there was really only one logical way to do this in Indigo. Of course, the flexibility is great, but it’s also really making it difficult for me to wrap my head around this particular problem.

So, I’m asking for advice from the seasoned pros here. Can anyone point me in the right direction? It would be greatly appreciated!

You are absolutely right that there are many ways this kind of thing can be done. So one of the most important factors is finding an approach that works for you. That you find logical and intuitive. That said, here is the method that works for me.

Create a “Dropdown” helper called DayPart (or whatever you like), with option values of “Pre-Open”, “Open”, “Last Call”, and “Close”.

Now set up your automations to be triggered when DayPart changes value. For example, turn on the lights and HVAC when DayPart becomes “Pre-Open”, lights to dim when DayPart becomes “Open”, etc.

Then use any of the calendar or scheduling options to cycle DayPart between its values. I use “Scheduler component” found in HACS, but really any method will work to do things like “Set DayPart to ‘Pre-Open’ at x:00 pm on weekdays”, etc.

Include a card on your main dashboard that shows, and lets you change, DayPart. So when you want to open early, you can just change that one value of “DayPart”, and everything will then start to happen based on that.

There are obviously many variations on this theme. But the key, to me at least, is the logical separation of “when” a state changes, from “what” you want to happen when that state does change.

Hope this helps!

2 Likes

Thank you for this suggestion! This is exactly the kind of advice I was hoping for. I like this approach and it makes a lot of sense to me. I’m going to check out the Scheduler component you mentioned now and see if this will work for my scenario!

1 Like