Scheduler card/custom component

First of all, again, great scheduler! These are just some suggestions, it’s great as it is! No obligation to do this at all. Anyway:

Possible stuff for @neliss:

  • Allow multiple variables
  • Add RGB color choosing for light
  • Add glob matching to include and exclude under domains
  • Add icons to groups automatically based on a mapping
  • Add UI for choosing time by dragging
  • Add more languages
  • (Maybe) Add comments to code
  • Add UI editor
  • Expand default config
  • And of course your ideas as well:
  • Improve the overall robustness: add diagnostics checks for running timers, etc.
  • Add localization options: the texts in the cards are now hard-coded to English, I can imagine this is not ideal for everyone. Also the first day of the week, AM/PM notations, etc.
  • Add support for grouping of actions: in most cases when you turn something ON automatically, you will also need a rule to turn it OFF again. Would be nice if you could set a start and and time in a single item.
  • Show more details in the listing
  • Show the ‘live’ timer status: in the list view, you will see per item the remaining time until it will trigger.

Thanks for extensive reporting, it helped me a lot in finding a big :beetle:

Summary of the issue:
You defined “climate.set_temperature” as service within the configuration of domain climate.
This is fine, but within a climate entity/domain it is sufficient to define it as “set_temperature”.
Internally these were not treated the same, which caused your schedules to be mapped as new actions since they couldn’t find an exact match in your configuration.

Bugfix is added in v1.2.7, please try it out and see if things improve for you.

1 Like

Confirmed; all the bugs I reported are gone.

I appreciate the inclusion of the temperature value in the saved schedule:

Screenshot from 2020-09-05 12-57-09

The previous version simply indicated ‘Set temperature’.

Suggestion: include the temperature value somewhere in this view:
Screenshot from 2020-09-05 12-59-57

The value is displayed in the slider’s thumb but only when the thumb is moved or long-pressed. If you simply tap the slider somewhere along its length, the temperature will be changed but you have no idea what value has been selected.

3 Likes

French was working until I update to 1.2.7. I’m back to english no mather if I erase the cache or reload or restart. My log is saying that I’m with 1.2.7 . My lovelace is yaml and the card is loaded like this.

    - url: /local/community/scheduler-card/scheduler-card.js?v=1.2.7
      type: module

We should find another way to load language

OMG add-on this is awesome!!! Can I suggest a one of schedule. i.e just to happen once then have it either turn off the automation or delete its self after running.

BTW I could only get it to work from the HACS when I manually added ?v=0 to the resource URL.

2 Likes

Not really yet, but you can make it occur only once a week.

Hello, great job for this project.
Just one question ;
is there a way to renane a schedule ?
in order to activate or nt in an automation for example or in a script ?

The entity id for schedulers is currently a random digit sequence, like switch.schedule_123456.
There is no feature implemented to define your own id, and renaming the entity id yourself will cause it to dissapear from the card.

What you could do is look in the HA entity registry which id belongs to the schedule you want to use in automations, and use this entity id.
Once a schedule item is created, the id remains fixed (also after editing) until you delete it.
It should be fairly easy to identify the entity id, since all time+action information is listed in the entity attributes.

I think @guims78 means the header that’s auto-generated based on the entity name, but I’m not sure.

Please add a friendly_name field, that we can comment for each schedule or the ability to to create tags for each schedule in order to group them.

I also noticed that when you 2 schedules that run on the same day and time that only the first one gets executed.

Yes, i think of this kind of skill.

Hi,

just a quick question to any one who has the component and custom card working: has anyone ever encountered the following error when trying to add a new scheduler entry?
“Failed to call service scheduler/add. Service not found”

Appreciate any help

Either:

  • You haven’t installed the scheduler correctly

or

  • You need to reboot Home Assistant for the scheduler to load

thanks KTibow for the fast reply!

ok I’ll uninstall the packages and give it another shot tomorrow.

How does the scheduler handle HA restarts (or more specifically stop and later start)?
Eg.: I have these schedules:

  • at 17:00 switch off sg
  • at 18:00 switch on sg
  • at 20:00 switch off sg

at 17:59 HA stops then at 18:01 HA starts. What will be the state of the switch after HA started?

Try it out yourself :slight_smile:

@LeadUr the state of the switch is not affected by restarts. Each entity will calculate the next (soonest) event and should trigger as long as future exists. The next_trigger property of the entity gives you insight in the next event.

To all: I will be a bit busy coming week, so no updates unfortunately.
I’m working on a feature for combining multiple actions in a single schedule entity, it will require some reorganisation.
Next up is the release of the new timeslot editor (which works awesomely already btw).

3 Likes

I don’t think I quite understand what you are saying, sorry.

So what I expect (staying with the example above) is that after HA starts at 18:01 it should switch the entity on, since according to the schedule it should be in the ON state between 18:00 and 20:00 even if HA was not running at 18:00.

Or I can say this with climate temperatures too. From 17:00 I want my temp to be 20. From 18:00 I want it to be 23 and from 20:00 to be 20 again.
So if HA was not running at 18:00 but it starts after that and before 20:00 I expect my temperature to be set at 23 and not 20.

Is this how it works?

I think so. It tracks the trigger after the last trigger, and if it’s later then the right trigger time, it triggers it. (I think, I don’t really understand how it works)