Here’s details of how I setup the scheduler card and associated script.
Card:
type: 'custom:scheduler-card'
discover_existing: false
standard_configuration: false
title: Schedule
include:
- script.irrigation_back_zone_1_run
- script.irrigation_back_zone_2_run
- script.irrigation_back_zone_3_run
- script.irrigation_back_zone_4_run
customize:
script.irrigation_back_zone_1_run:
actions:
- service: script.irrigation_back_zone_1_run
name: Run Time
variable:
field: runtime
name: Min
min: 1
max: 60
script.irrigation_back_zone_2_run:
actions:
- service: script.irrigation_back_zone_2_run
name: Run Time
variable:
field: runtime
name: Min
min: 1
max: 60
script.irrigation_back_zone_3_run:
actions:
- service: script.irrigation_back_zone_3_run
name: Run Time
variable:
field: runtime
name: Min
min: 1
max: 60
script.irrigation_back_zone_4_run:
actions:
- service: script.irrigation_back_zone_4_run
name: Run Time
variable:
field: runtime
name: Min
min: 1
max: 60
time_step: 1
Script (one for each zone):
script:
irrigation_back_zone_1_run:
alias: Back Lawn Zone 1 Run
sequence:
- service: input_number.set_value
data_template:
value: "{{runtime}}"
entity_id: input_number.irrigation_back_zone_1_run_time
- service: switch.turn_on
data:
entity_id: switch.irrigation_back_zone_1_valve
mode: single
I’ve changed my esphome code a bit so now so that the esp32 handles all of the turn off commands by itself.
I used this as a reference for that. Also happy to share what I came up with but it’s probably more suited to an irrigation thread not this one.
If the scheduler integration shows up in the integrations list, it is installed properly.
If this is the case, but the services don’t exist, it must have crashed.
Check the HA log for a crash report.
Also make sure you run the latest version of the component. There was a backwards-compatibility issue introduced in previous release (v2.1.0). Gave issues for pre 0.115 HA users.
Make the icons on the left into buttons (like RomRider’s button cars) that you can toggle. Ideally add styles options to color the background and the icons when on and off. This can give a natural feeling and visual cues of turning a schedule on and off and solve the problem of missing the toggle switch.
Maybe even turn the whole width of a schedule into a toggle button, that has styling options for on and off state. Tap to toggle on/off, hold_tap to edit the schedule which then opens the editor you have now.
Regarding a popup: you can do that, but keep in mind some weaker devices (like €200 tablets) have a hard time rendering a loaded popup with css styles. Which comes to the second thing to keep in mind. Your card will depend on browser mod (I do use it, but not everyone). Also, styling popups is now more work.
Perhaps if you go the toggle button style route I laid out, you won’t need popups at all.
@ASNNetworks With popup menu i meant these kind of menu’s:
I tried in on the card, but it fails in the overview page (the next schedule item in the list would be displayed on top of the menu when it is expanded, looks very ugly).
Anyway, I like the idea of introducing a tap/hold. I will try it out, hope it is intuitive.
Sorry, I got it now.
The main consideration is that schedules work completely independent.
You can create a schedule for each saturday morning.
And you also create another schedule for each workday, and configure saturday to be a working day.
Butif both schedules happen to control the same device (say your thermostat), you could get conflicts.
In particular if both would do an opposite action at 9:00, I cannot tell you which action will win (will mostly depend on the order in which they are created).
Its your own responsibility to avoid schedules that overlap/cause conflicts.
Especially with the new time scheme feature, I would highly recommend not to introduce multiple of them that operate on the same day(s).
I heard someone say that it should be forced that all timeslots have actions assigned.
Actually, I think it could be useful to leave some timeslots unassigned.
Remember that if you restart HA, in the middle of a timeslot, it will repeat the action.
I wouldn’t like to have my curtains open in the middle of the day when i have visitors.
I’m thinking to unite the two types of editors, so you can combine both types of actions (i.e. make a timeslot with a endpoint action). It should be more evident which behaviour you can expect. But it will take a while before I can get to that.
I understood all that, but I just wanted to give an idea of how to improve. Then I know it’s a lot of work and I don’t have any requirements, just an idea.
Let’s imagine a schelude for Saturday:
07/09 : 22°
09//12 : 18°
12/14 : 22°
etc…
And on this schedule an option that would allow to replace this schedule by another one (defined, to choose) on a condition (workday holiday for example)
Of course, since workday: changes state at midnight we can also do this with an automation by activating or deactivating a schedule, as long as we identify them with a Friendly Name.
I’ve got the latest components, I’ve triple checked.
Scheduler Component: 2.1.1
Scheduler Card: 1.7.2
I’ve searched the entire home assistant log for “schedule” and don’t see any mention of crashes. Is there another string to look for?
Update: A moment ago, I just removed both the scheduler component and the schedular card using the HACS UI. I confirmed the directories were deleted in the custom_component directory. I rebooted, then reinstalled both and reboot again. Still no luck.
Weird stuff! As a last resort you could try to remove it from the registry.
In .storage folder, open core.config_entries, and delete the entry having "title": "Scheduler integration".
It is important that all, including the brackets {} are also removed, and the JSON pattern is maintained (so make sure entries are comma separated, no comma for the last section).
This should remove the integration and bring you to the point of a ‘fresh’ install. So it should pop up in ‘integrations’ when clicking the big orange +.
Note that if you want to keep your HA clean, it might be good to check core.device_registry and core.entity_registry and also remove all entries refering to ‘scheduler’ there.
All this file hacking should be done while HA is stopped. And only do it if you feel comfortable doing this trick.
I’m having the same problem. I have the sun integration available and running, I’ve set a time of 01:00 hours and still the sunset/sunrise button is disabled:
Hey! It’s a great component and I wonder how come it is not there by default. However, it was a really unpleasant experience for me to install it. The instruction says this:
Yup, think that’s you being new to HA.
Consider using HACS or UI mode if it is difficult for you to set up.
Perhaps your timezone is set incorrectly?
And check the next_trigger attributes for the created schedule entities. These are representative for when the timer will fire.
Apparently it was not that difficult since it finally worked. It would be faster though if the instruction mentioned about lovelace resources not just resources. Especially when somewhere else it guides in detail how to find “+” button to add an integration
Perhaps your timezone is set incorrectly?
That was it, I was unaware of the timezone was set incorrectly. Now everything works perfectly. Once again, congratulations on the great work!
Thanks. I’ve read the doc a couple of times but it was not clear from reading it that this is the expected input:
“In sunrise/sunset mode, the time picker will show the offset relative to sunrise/sunset. The time offset is automatically calculated from fixed time.”.
Perhaps that’s the key sentence, but to be honest, still now reading it, I could not deduce that it would mean that one need to set the actual time in the control between the interval when the sunrises or sets to be able to select that button. Wouldn’t be easier if the control is always enabled and if the user selects it, it will only allow a 2hour max interval?
Another issue I have now, that the button is active, is that I can’t switch to sunrise mode. It always switches back to sunset. I guess I’m missing something else obvious . See here:
I think you’re right. So I removed this restriction for now.
That is weird to see. I tried it but I don’t have this problem (wish I had).
Even weirder that it takes half a sec before it jumps back, no idea what could cause this.
Does this issue always occurs for you? Also in a different browser or device?
Release v1.7.3
This release brings changes to the overview page.
As announced before, I replaced the toggle button (for disabling/enabling schedules), by a counter showing when the schedule will fire.
As replacement for the toggle button, you should now tap/click on a schedule and hold to enable or disable it.
Schedules are now also sorted in order of occurrence.
The displayed text in the schedule overview is changed as well. I tried to make it more compact, to keep the overview organised.
Hope you guys like it.
Suggestions are always welcome
PS: for those who contributed with translations, I would like to ask if you could revise your file. Please take the English translation as reference, and check which parts are changed. Don’t translate things between brackets.