Scheduler card/custom component

Can you check if your HA version is 0.115?
If so, can you check for errors in your log?

I am on 0.114.4, i need to update on 0.115 ?

Here more log

Logger: homeassistant.setup
Source: setup.py:258
First occurred: 12:10:50 (1 occurrences)
Last logged: 12:10:50

Unable to prepare setup for platform scheduler.switch: Platform not found (No module named ‘homeassistant.helpers.trigger’).

@tonioa There is a small issue with 0.114 and the scheduler-component.
I am planning on making a release later today that solves the issue.
But if you want to fix it now, best is to update HA.

@aeklo @Sachagroupe The new v1.7.2 release of the card should solve the problem causing climate actions ‘set mode’ and ‘set preset’ to fail. Please check it out.

Hello,
thank you, it is now functional “climat”.
You are really responsive!
:wink: :clipperton_island:

Just updated to v1.7.2, and I have a new error in the logs (only 1 this time, just reporting, no fuss :slight_smile: )

Oct  4 13:52:52 localhost hass[24287]: 2020-10-04 13:52:52 ERROR (MainThread) [frontend.js.latest.202009171] https://1.2.3.4:1234/local/scheduler-card.js?v=3:162:0 NotSupportedError: CustomElementRegistry.define: 'time-picker' has already been defined as a custom element

Oh dear, there we go again :crazy_face:
I cannot really relate this bug that anything I changed in this update.
Do you happen to have multiple scheduler-cards or something?
Perhaps a cache refresh of the browser could fix it?
Which HA version are you on?

Hmm
 it happens only, when I go to Configuration->Lovelace dashboards->Resources to change the v=number parameter. When I change the number to a new value, and click on Update the log I mentioned appears.
I don’t have multiple scheduler-cards, and HA version is 0.115.1

It looks like this issue:

The lazy loading applies specifically to the UI elements that the frontend uses.
Such as the checkbox and slider elements.
I had a discussion about this with Bram Kragten and Thomas Lovén.
Which led to reverting the lazy-loading in 0.115.3.

I’m not really happy with the re-introduction of lazy loading in 0.116, because:

Unfortunately, there is no technical solution for this at the moment.

Which is basically a slap in the face for custom card developers. Means that there is a big chance that buttons, sliders, checkboxes in this card will break and there is no fix for it.
The proposal is that custom cards stop using any of these elements. And make our own

Anyway, let’s see what happens.

The problem that @LeadUr is having is not likely to have anything to do with lazy loading. As far as I know the Scheduler card will be loaded as soon as you open any Lovelace view.
Things could get weird if there is still an old version of the card in the browser cache.
I don’t know. I’m kind of getting tired of the endless caching issues of HA.

3 Likes

Ah ok. If time-picker isn’t a frontend element then it does sound like a cache issue. Lucky you :slight_smile:

The same issue occurs if you don’t check that the element doesn’t exist before redefining it, except it’s scheduler-card instead of time-picker.

hello neliss,

you started a great project there.
My respect.

Could you include something for irrigation?
For example, start sprinklers or zones with a delay?
So that you select several zones, for example 3 zones, and start one after the other, with a short break of 3 seconds.

Why not just create scripts for each zone and then use the scripts as schedules?

@Kabala Thanks for your compliment.
Irrigation devices could be scheduled, as long as they are HA entities.
I would expect they are switch entities?
So if you include them, they are available for schedules.

The delay between zones is very hard to do.
Minimum resolution for timers with this scheduler is limited to 1 minute.
Also there is no support currently for repeating some job with some interval.

I created the scripts for the zones, but I thought it could be implemented directly without creating any scripts.

They can, as neliss said, just schedule the switches that control the valves.

Is it possible to remove actions from the card?

I have created a customised action for a script which allows me to set a number. This is the only way I want to be able to run the script - I don’t want the “run, turn off, turn on” options - only my customised one

See https://github.com/nielsfaber/scheduler-card#customization

Thanks KTibow. I’ve looked there and got the number customisation working, however, I still get all of the other options in addition to my customisation. What am I missing?