Scheduler card/custom component

im guessing it’s downloading to a different directory

Is it possible to automatically turn on or off some schedule ?
I will like to have an automation that verify an entity, if true then turn some schedule on and others off and vice-versa.

Unless there is a better way to do it.

My wife work on non standard week period. She works 9 continuous day and then 5 days off. But I am on a 5/2 work period, and my kids too.
I cannot use the status home/away as she is also on night shift, so when I am out for work in the week, she is sleeping. I want to have difference schedule based on workday/weekend and her workday.

All looks fine to me.
volumes/home_assistant/custom_components/scheduler should contain a bunch of .py files.
volumes/home_assistantwww/community/scheduler-card should have the scheduler-card.js file.

After rebooting HA you could check for the log line:

We found a custom integration scheduler which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

If this is shown, installation of the custom component is fine.
If it doesn’t show up in integrations still (clicking the blue button in the bottom), it must be some browser caching issue.

The card should be installed as well. You should be able to add it to Lovelace, either via UI or YAML.
If not, you might need to add it as a resource.

1 Like

just waiting now hopefully now its working
within config

Please wait while the integration is being setup

it now working
Ya
thanks for the help

Yes, I understand very well this would be useful for you.
I added the option of making timeslots relative to sunrise/sunset only 2 months ago, so it’s quite new and far from perfect.
The issue of reversal of start/end times of timeslots is quite a complex topic.
The scenario you are considering is quite straight-forward, but there are also scenarios where multiple timeslots are involved.

Example
Where I live, sunrise is at 8.15 currently.
I can make a schedule with 3 timeslots (who would stop me?):

  1. From 06.00 to 07.00: turn on lamp
  2. From 07.00 to sunrise: turn off lamp
  3. from sunrise to sunrise+1 hour: turn on lamp at 50%

In the summer the sunrise occurs at around 06.30.
So timeslot 2 will have negative duration, it should be reversed. Also it partially overlaps with timeslot 1.
Timeslot 3 will be from 06:30 to 07:30, it overlaps both 1 and 2.

In summary, its a complete mess. Honestly, I dont know what would be the most intuitive response from scheduler. It basically is expected to perform 3 different tasks at the same time.
Additionally, the timeslots are impossible to visualize in the card.

At least for now I think it’s better that you either:

  1. Keep your timeslots long enough such that the start and stop will never pass each other
  2. Use either fixed time or sun dependent time, but don’t combine them
  3. Take look at the schedules a couple of times per year and make corrections where needed (you can even use scheduler to send you a reminder 2 times per year)

You can assign a condition to a schedule (e.g. some binary sensor which must be active for executing the task).
Also schedules are switch entities, so you can use automations to turn them on or off as you wish.

I feel pity for your wife!
You might want to look into the google calendar integration. I am not familiar with it, but I believe you can configure it to have on/off state depending on both your work hours (and then use that as a condition for schedules).
Otherwise, you could use device trackers to see whether either you or her is home.
I wouldn’t know what else you could do to solve this.

I actually think reversing the time slot would be unintuitive; rather, when the times become reversed, the time slot should simply not exist that day. In your example that would mean that in the summer, timeslot 2 will not be there.

What then remains undefined is whether timeslot 1 or timeslot 3 will grow shorter once they overlap. I had only imagined the situation where the state is the same in those two slots. The best way I can see of resolving that conflict would be to have a checkbox on the boundary specifying whether it takes precedence.

boundary A: 06.00
timeslot 1: lamp on
boundary B: 07.00
timeslot 2: lamp off
boundary C: sunrise
timeslot 3: lamp 50%
boundary D: sunrise + 1 hour

While sunrise >= 07.00 there is no conflict, but eventually timeslot 2 will be gone. Then with a priority flag on boundary B, the schedule would become:

boundary A: 06.00
timeslot 1: lamp on
boundary B: 07.00 (priority)
timeslot 3: lamp 50%
boundary D: sunrise + 1 hour

and with priority flag set for boundary C it would instead become

boundary A: 06.00
timeslot 1: lamp on
boundary C: sunrise (priority)
timeslot 3: lamp 50%
boundary D: sunrise + 1 hour

In both cases, timeslot 2 is gone, but in the first one timeslot 1 shrinks, and in the second one timeslot 3 shrinks, as sunrise keeps getting earlier.

I suppose that for now I can set a four different schedules and use conditions to make sure that the winter schedule runs only while sunrise is later than 6 am, September to April, and then the spring/fall schedule runs until June when sunset is later than 10 pm, and so on. As long as the addon doesn’t crash from having “invalid” but inactive schedules that should be workable. It would be really nice to have a “real” solution though :slight_smile:

So I’m trying to make irrigation schedules using a drip system and several valves for a range of pot plants. The service I’m running it’s not the valves (switches), but a script, which turns on the valves and after a delay it turns off the valves, I am irrigating multiple times a day for very short periods of time (seconds to a few minutes).

I pass some variables to the script like the delay time and valve ID via service_data, and everything is working fine, the problem I am having is that I can make a schedule for only one valve at a time but not multiple valves at once( because the valve ID is different) the scheduler card doesn’t let me choose an action, and don’t get me wrong I see how this can be problematic, but if 5 valves are going to do the same thing I would have to repeat schedules for 5 different valves.

I have been trying to solve the problem for a while, any ideas how I can overcome this?

In scripts you are able to execute a sequence of actions. So you can open 5 valves with a single script. Would make a very simple schedule as well.

In scheduler it’s not possible to execute a sequence of actions (only multiple entities having the same action). But maybe you could pass a list of valve IDs to the script (via service data), which handles them one by one.

Alternatively, you could create some input_boolean per valve and use automations to link them to the valve actuators (if you don’t want scheduler to communicate with the actuators directly). Then each valve becomes a separate entity which you could combine in scheduler.

Okay yeah that makes sense, thank you for your reply, and for your time developing this awesome scheduler, I’m going to explore both options.

Awesome work!
I have a question: is there a way for changing switch state (for example setting a different temperature on a thermostat) from an external service (through Home Assistant web api) such that the card is updated?
Thank you very much

First of all thanks for this awesome scheduler!

Question/request: Is it possible to do monthly schedules? Running a task on a set day and time for selected Months?

Hi. Rather than open a issue, I figured i’d bring it up here first.

The entities created for the schedulers currently have the “entity_category” set to null. The ramifications to not setting this is the entities also start auto-appearing in google assistant and are added to lovelace automatic generations all be default. There are components that don’t allow us explicitly exclude them and those become ineffective if they don’t support globbing (such as google assistant configs if the domain is included which is pretty normal for ‘switch’ and they will then appear in auto-generated lovelaces for example. ).

Is there a reason this is being set to null and Is it possible to change the entity category to config to address this?

I was hoping I could do this myself with customize_glob but changing the entity_category isn’t supported.

customize_glob:
  "switch.schedule_*":
    entity_category: config

I created a pull request per your approval.

Hi,

At home, our 4 kids have different tasks. The kids arrive on wednesday (2 of them) in the odd weeks and on friday (in the odd weeks).
There are 4 tasks (like empty the dishwasher) etc… and every kid has another task, every week. So actually, every 4 weeks they will do the same tasks.
I already created input_select fields with the name of the task & with 4 options (name of the kids). Now I want to setup a schedule starting today (because it is wednesday today) and repeat the tasks for 1 week every 4 weeks.

So to be clear:
Wednesday to wednesday for kid 1 : Dishwasher
Wednesday to wednesday for kid 2 : clean kitchen

And this needs to happen every 4 weeks (because kid 1 will have again task 1)

Is it possible to arrange that with the scheduler card ?

Outcome : I want, based on the scheduler, create a page with an overview of the 4 kids and picture-entity of the task they need to do

Thanks a lot in advance !!!

Kr,

Bart

Are there an updates needed for the installation of these two components. Ex: I cannot find “front ends” for the card and I think it is now “integrations” – however when I go there I do not see anything I can do to get the scheduler and/or card to show up

Great card/component!

I am having some issues with the workday integration. Weekends work, but I’m having some difficulties with holidays. Today is configured as a holiday, however all of my workday schedules triggered.

Any help with what I am doing wrong would be appreciated!

- platform: workday
  name: workday
  country: CA
  province: "ON"
  workdays: [mon, tue, wed, thu, fri]
  excludes: [sat, sun, holiday]
  add_holidays:
    - "2022-01-01"
    - "2022-02-21"

I added a condition to the scheduler is it possible to remove or modify it?

found randomly… but… it’s a bug right?

Animation

Anyone had an idea on this question ?

Important heads-up for users of scheduler
In a couple of days the 2022.3 release of HA will come out.
It comes with quite a significant change which will break a couple of things in the scheduler-card (text fields, dropdown lists, etc).
I haven’t got the time yet to update the card in preparation for the changes.
In case you don’t like the card being (partially) broken, you might want to wait a bit with updating your HA installation.
Hopefully I will be able to make a fix for this in the next weekend, I will give a shout when this is in place.

For details of the changes in HA see here:

5 Likes