Scheduler card/custom component

Hello, more questions :slight_smile:

  1. I would like the scheduler to only address climate devices and ignore the rest of the device types.
  2. I would also like it to skip the selection phase of the device type (group) and when selecting to add an item, automatically select the climate group and move to the next step of selecting the entity to control.
  3. Going further, I would like to define a card per AC (each AC unit will have its own card). In that case, when adding an item, automatically select climate and the entity, and go directly to selecting the action.

Can these be done?
Thanks!

1 Like

I agree it looks misleading but is it such a bad thing?

If you solve the issue it introduces another one; what happens if I override the state of an entity manually during that time?

With the action performed only on entering the time slot this isnā€™t an issue.

@Motti_Bazar

  1. I would like the scheduler to only address climate devices and ignore the rest of the device types.

Yes. @Isablend asked the same question.

  1. I would also like it to skip the selection phase of the device type (group) and when selecting to add an item, automatically select the climate group and move to the next step of selecting the entity to control.

I suppose that if you only have one group, this makes sense. I will have to add it though, currently you will still have to make an extra click. But good idea :+1:

  1. Going further, I would like to define a card per AC (each AC unit will have its own card). In that case, when adding an item, automatically select climate and the entity, and go directly to selecting the action.

That makes sense. Could you make a feature request for it so i will remember? :innocent:

Some users out here had kind of a strong opinion about this.
For now, I decided that the scheduler will only trigger actions on entering a timeslot.
Here entering includes:

  1. The start time of the timeslot has been reached
  2. HA just started up, and a schedule starts somewhere in a timeslot
  3. Schedule was turned on (switch was flipped) and it starts somewhere in a timeslot
  4. Schedule was just created or modified and it starts somewhere in a timeslot

The first condition is already in place, the card is pretty much done actually. I could release it somewhere this week.
But thereā€™s a good chance that the scheduler-component will need a (big) update for supporting the remaining conditions, since there is currently no detection of a timeslot.
I expect that migrating the component will cause all the schedules to get corrupted (as in, your existing timeslot schedules will be wiped). Simply because the data stored in the entities will need to be changed.
I donā€™t know how people will react to these kind of breaking updates, so Iā€™m a bit conservative here :blush:

3 Likes
  1. I added a features request for the two features (action to set mode AC mode and temperature, automatic selection of group and entity). It will be great if you add these
  2. Regarding addressing only the climate devices, when I set both switches to false as suggested, I get the device I defined in entities but only with the two options to set to cool and heat. How do I define to it to show all actions (cool, heat, temp, off)?

That sounds good to me.

By gracefully accepting this sort of thing can happen to early adoptersā€¦ one would hope.

1 Like

Iā€™m not an advanced user, but I think there is a way to migrate entities between integration versions.
Take a look at async_migrate_entry function. For example this one. Hope this helps :slight_smile:

@neliss Iā€™ve raised an issue on Github with an issue I have experienced. It is;
I have defined 2 schedule cards in HA. One controlling schedules for some window vents, the other for defining activities in the Garden. The both have defined titles and are show on different pages in HA. When I move from one page to the other the title of the schedule card is not refreshing. I.e. when I am on the Garden page and move to the the vent page the schedule card displays ā€œGardenā€. Not sure if this is a card issue or a Chrome issue. If I press CTRL-F5 after moving pages it forces a refresh of the name of the schedule card.

One other observation. Is it possible to define groups of entities you want to schedule the same activity for? For example closing a set of blinds or putting on a set of lights? At the moment Iā€™d have to define schedule events for each unique entity or have I missed something (againā€¦)

These are minor issues by the way for an integration and card that are superb.

@isablend
I will check the issue with the titles when I have the time for it. I must say I never tested this scenario.
If it really bothers you, you could hide the title in both cards (and even place a markdown card as title replacement).

Regarding operating multiple devices at once, this is what scenes are intended for.
Ofcourse you could configure the scheduler to activate a scene.
But, I would like to allow picking multiple entities for a schedule in a future release.
It will have its limitations though, maybe only the same action, and same device type (so e.g. turn on multiple lamps). I donā€™t want to over-complicate the GUI.
Should be there in a couple of weeksā€¦

1 Like

Am I the only one who finds the time input to be confusing when trying to set something based on sunrise/sunset?

For example, I find it confusing the the sunrise/sunset icon on the bottom right is disabled and not clickable in this view:

image

If I increment the hour by 1 (e.g from 12:00 to 13:00), itā€™s still not clickable:

image

However, I then increment to 5pm/17:00, and it suddenly becomes clickable:

image

Then if I tap, it the time entry becomes like the following, which Iā€™m assuming means 1 hour before sunset?

image

My suggestion would be to have some option when configuring the turn on/off timing, to either select ā€œTimeā€ or ā€œEventā€. If you choose Time, itā€™s purely time entry.

If you then tap on ā€œEventā€, you use the same UI except Iā€™d recommend using the words ā€œSunriseā€ and ā€œSunsetā€ (or ā€œDawnā€ and ā€œDuskā€ if thatā€™s better) instead of just icons.

@tmchow

If I increment the hour by 1 (e.g from 12:00 to 13:00), itā€™s still not clickable:

12:00 would be calculated to like 5 hours after sunrise
13:00 would be calculated to 5 hours before sunset

In my opinion, it doesnā€™t make sense at all to schedule something that is 5 hours away from sunrise or sunset.
So, I decided, that sunrise and sunset modes are only available when you are around (within 2 hours), of either.
I agree that this is something you have to figure out. But thatā€™s why i wrote a manual for it. Once you get the hang of it, Iā€™m sure you will be able to use it.

My suggestion would be to have some option when configuring the turn on/off timing, to either select ā€œTimeā€ or ā€œEventā€. If you choose Time, itā€™s purely time entry.

I think this is also a matter of taste. Personally, 1 hour before sunset doesnā€™t tell me much.
If I want to have my light turned on when its halfway of getting dark, I will wait for tonight and check at which time it seems half dark. At that time I program my schedule, let the UI calculate the offset.

If you then tap on ā€œEventā€, you use the same UI except Iā€™d recommend using the words ā€œSunriseā€ and ā€œSunsetā€ (or ā€œDawnā€ and ā€œDuskā€ if thatā€™s better) instead of just icons.

Agreed that the icons are not the best fit for the job. But I didnā€™t find more suitable ones. I would like to avoid using text as much as possible, since this is customary in Lovelace cards. And it will be quite some extra work to add translations to all languages.

Iā€™ve installed Scheduler Integration and Frontend card twice on two completely separate systems (both HA Container) with HACS.

I can add the card but when I save I get ā€œFailed to call service scheduler/add. Service not foundā€

I have most certainly restarted HA on both systems multiple times, and I have even done a reinstallation of the Scheduler Integration.


EDIT: One step I overlooked in this thread and in the documentation is:

In HA, go to Configuration > Integrations. 
In the bottom right corner, click on the big button with a '+'.
...
Select it, and the scheduler integration is ready for use.

I had become accustomed to HACS integrations that install without further action from the user.

I hope this helps someone else!

As far as I know this is not possible, but I would like to be proven otherwise.
Most custom_components are not true integrations, in the sense that they are not managed by the ā€˜integrationsā€™ page but in your configurations.yaml.
Why is the scheduler-component an integration? Because it is UI managed. This is the only way to have it automatically generate entities for you. Check out here for more info.

I did not know that

This makes sense, and by no means was I demanding it. The installation was seamless, bar me not checking the README.md :roll_eyes:

I do have one request; any chance of adding a Buy Me A Coffee (or similar) link on your GitHub?

2 Likes

@neliss yes, add such a link. The users will be able to thank you somehow and support future development :slightly_smiling_face:

2 Likes

Or you can just add a link to the forum topic and maybe saythanks.io.

@fanuch @Misiu
As requested, if you feel like I deserve a donation, you can now do so.
Rest assured that donations are not needed to keep improvements coming, I do this for fun.
Ofcourse the gesture is very appreciated :blush:

1 Like

I totally agree, but my proposed approach doesnā€™t mean you have to have that large of values. In the node red module I use for scheduling, what I really like is they allow you to specify an exact time or the event. See this drop down values they provide:

image

Whatā€™s nice is you have more subtle options for daily events such as choosing between ā€œdawnā€ and ā€œsunriseā€ which are technically different.

However, in addition to this, they also have an ā€œoffsetā€ which is what you are doing, which takes in a positive or negative value. e.g. ā€œ-60ā€ is 60 mins before the event (such as 60 minutes before dawn).

Youā€™re right the UI input is a matter of taste. However, I disagree that ā€œ1 hour before sunsetā€ doesnā€™t tell. you much. Your scenarios of ā€œI want to have my light turned on when itā€™s halfway getting darkā€ is dynamic and changes as days/weeks progress through a season due to changing sunset times. So the best way is to do offsets from one of those events (dusk/sunset, etc).

e.g. Turn this light on 60 minutes before dusk
image

Yeah, totally makes sense about the concern over translations. However, Iā€™m really pushing on adding more event types as mentioned above due to the power it unlocks, so using words is unavoidable since you wonā€™t find good icons to differentiate dusk vs sunset.

To be clear, i love the card so far. Just giving input to make it really powerful (and so I can get ride of my dependency on Node Red for scheduling!)

Is it possible to use this with a group of switches? Iā€™ve got 3 smart switches controlling exterior lights that I want on the same schedule. Iā€™ve defined a group for them, but they donā€™t show up as options in the scheduler card.

Is this because groups like this arenā€™t able to be toggled on/off in Home Assistant, or is it a limitation of the Scheduler card in that it doesnā€™t work with groups?

Doh, itā€™s explained in the docs:

Check the docs, and add it as a domain.

1 Like