Scheduler card/custom component

I’m after some advice as to the best way to accomplish something…

I’d like to schedule some devices using schemes. I tend to group things according to tags, so the UI is split up into various sections, each containing the schedules for some like devices. I have a requirement to manually enable one group, which will run multiple schemes. I can do this using the show_header_toggle option. Then I can just toggle that for my group of multiple schemes. But sometimes I only want that particular group to run once, and disable itself at a certain time. The “stop” option doesn’t seem to help here, because it only stops the scheme at midnight (I think). Some of my schemes have devices that are turned on across midnight.

Hope I’ve made myself clear enough! Bit hard to explain…

Hey all - I’m fairly certain that I have successfully installed scheduler components and also the scheduler cards on my docker version of Home Assistant. However, and I know this is a dumb question, where should be actually creating a schedule?? The instructions say go to “add card”, so I assume it means the add card under edit dashboard? I tried that but don’t see anything related to scheduling in the list of dashboard cards. In developer options → services, I see the scheduler components and they both show up in my HACS integrations. I’m sure I am missing something obvious.

Yes, should show up when you add a card, like this. I presume you’ve done the obvious and restarted HA…

2 Likes

Oops… I restarted after the components, but I guess I forgot to after the scheduler card install. Womp Womp. Thank you.

Wouldn’t be the first time for any of us!

Hi @neliss.

First of all, thank you for your contributions :+1: I love the scheduler Lovelace card you created.

I’m the maintainer of the Vaillant vSMART custom component which integrates with Vaillant smart thermostat. This thermostat has its own app and it also has a daily schedule, which can’t be turned off. Because of that, I thought of exposing this schedule inside HA.

In my research, I stumbled upon your Lovelace UI card and it’s matching custom component and created a proof of concept implementation of my custom component as a backend which uses your Lovelace UI card as a frontend.

With the PoC done, there is a confirmation that your UI card can be used with multiple different components in the backend, as long as the component implements the same API (both HTTP and WS).

What I’d like to discuss is if you’d be willing to take contribution which would extend the UI card implementation with the ability to hook into any configurable backend? This would allow users to set up multiple different cards, all of which connect to different backends.

I haven’t read the whole thread, so I apologize if this was already discussed (and dismissed :smiley:) previously.

Here are the PRs which:

  1. Show the PoC implementation of my component integrating with the UI card to show data from the Vaillant API
  2. Show the draft of changes which would be required on the scheduler-card UI to extend its usage beyond scheduler custom component to any custom component, configurable by users

Attached is the screenshot of vaillant_vsmart custom component running locally using your scheduler-card component as a frontend to show schedules defined in the Vaillant API.

Hi. First of all, I love the “scheme” editor. It’s so easy to use and clear at a glance.
My question: is there a way to use the scheme to display the thermostat schedule instead of state switches? That would be more convenient to me.

Scheduler is intended to be independent of device integrations.
It controls devices on the moment of triggering, rather than storing the schedule on the device/integrations side.
I believe it is better to have your custom component facilitate being triggered remotely, and disable its internal schedule.
I have never seen or heard of a device that MUST be operated on an internal schedule, it seems not in-line with HA principles.

If you want to proceed creating a card as frontend for your climate integration, I suggest to cherry-pick stuff from my card (you hereby have my permission :wink: ) and create your own.
I think there are a lot of things in the card which would be cumbersome (and unnecessary) to implement for your integration, like: calculating actions for all entity types, conditions, sunrise/sunset, date ranges, tags etc.

I checked the changes you made as your POC. I am OK with adding these to the card since there are very minimal, but I really have my doubts it will stop there (due to the many functionalities you might want to hide). Perhaps it would be possible to create a separate repository for the UI elements of the card (like time pickers) which you could import in the card.
I must say the time I can currently spend on this project is very limited.

I don’t really understand what you mean.
You mean that you only have 1 item in the card and you want to show its configuration as default, instead of the list view?
Anyway: there is no such functionality in place. It would have to be created.

Thank you for the answer.

I completely understand your point of view :+1:

I’d like to proceed in a way which you proposed here, in that case. I’ll fork your repository and make those changes in the new card, which I’ll release as a separate repository in HACS.

As you said, it might diverge a lot in the future, so maintaining those changes could be easier. If that ends up not being the case, we can always merge my changes back any time in the future :wink: I’m currently not interested in making significant changes on the UI front, I’m just looking at the easiest way to expose this internal schedule in HA frontend, a problem which your UI card solves perfectly :smiley:

1 Like

One more question, but not sure if this is the place to ask.
I was playing around with thermostat card and generic thermostat integration, and figured out that my house has a huge inertia, dropping the temperature only 3C in 24 hours, while outside temperature is 0C curently.

Problem is that set temperature is reached very late, as the thermostat has no idea of the schedule and can’t react in advance.
Since the card and generic thermostat integration are separate pieces of the puzzle, how would one implement the function of “look ahead”, so the boiler would be switched earlier, to rech the temperature when scheduled?
Can there be some kind of simple time shift, to at least offset the switching time? Now I have to manually offset the schedule to account for the inertia.

Scheduler is only able to set a temperature to X degrees at certain time.
There is no intelligence inside scheduler to predict how long it takes to reach the setpoint based on the current temperature (it does not treat a thermostat differently compared to if you would use it to switch on a lamp so to say).
As you already said, you would need to schedule the task earlier if you want the heating to start earlier.

Is there a simple option to rerun a scheduled group.

Sample:
HA was restarting scheduled time was missed an like to rerun manually

If you create a time scheme (so consisting of timeslots), the action which initially overlaps is automatically triggered, also after restarting HA.
For other schedules you can use the scheduler.run_actions service to trigger the execution manually.
I don’t know what you mean by ‘scheduled group’ though. Schedules don’t form groups (but you can assign them with certain tags).

The release info for v3.2.4 says:

  • Adds option for re-triggering schedule when conditions change

Where can I find that option?

Thanks :slightly_smiling_face:

Thanks @neliss

1 Like

Hi
Is there a way to add (calendar.ical_working_week_test) this to the condition.

Ive added the iCal integration to track my Shift working week 3 days on, 1 off and 3 days on.

Its listed in the entities but its not a sensor or switch so i cant select it in the Scheduler condition section in the lovelace card.

Turns out I was too impatient, it showed up in the latest version of the scheduler card :blush:

1 Like

There is no support for calendar entities built into scheduler.
I have never used it in HA, but it seems to behave similar to a simple on/off binary_sensor.
In that case, you might be able to make it show up as option for conditions by telling the card which states it can have:

customize:
  calendar:
    states: ["on", "off"]
    icon: "hass:calendar"

Thank you I’ll try that.

Hi,

I’m trying to use the scheduler-card but can’t ‘activate’ it on a dashboard? I tried to follow the instructions but I think I’m missing something…

  • I installed HACS
  • I installed the scheduler-component (via HACS > Integration) , rebooted
  • I activated the scheduler-integration (via config > Integrations); I’m seeing 1 device
  • I installed the scheduler-card (via HACS > Integration), rebooted
  • I went to Configuration → Lovelace Dashboards → Resources Tab to add /hacsfiles/scheduler-card/scheduler-card.js

I went to my HA dashboard; used the ‘+ add card’ button and try to find the schedule card but it’s not in the overview?

What am I doing wrong?