I’m using this card to set when my heating comes on and off. Is there a way to set the heating to off if I’m away?
You have to do an automation for this. Scheduler cannot help. The challenge is to mix the both mode (scheduler and automation). For this, may be the scheduler should trigger some automation which can handle the both.
I love this HAC. I have over 50 schedules.
Is there a way to use this integration to maintain state after an electric outage?
For example, if HVAC is set to on at 23C and there is electric outage for HA, the HVAC and integration hardware all go down, I’d like to see the HVAC reset to on at 23c when the electricity comes back.
At present this does not happen when I use schemas.
Thanks!
Best is to ‘overrule’ scheduler whilst being away. So turn off the schedule (switch entity) once you’re away, turn off the climate device. Turn back on the schedule when you arrive home and it should take over control.
Works fine for me. Are you sure you use latest version of the card?
By design after starting HA, scheduler waits for the climate device to be ready (i.e. not being unavailable or unknown) and then performs the action of the current timeslot.
So it should already work as you want, unless the climate device ignores the action.
Hey @neliss. Got a situation with the “scheduler.run_action” service and I understand what you say here in this post.
I have two schedules :
- one on workdays with multiple timeslots (make scheme);
- one on weekend with a single action.
I need to enable or disable these schedules in some automations. When I enable the schedules I need the actions to be executed just as the schedules would have been active (therefore only those that apply to the current date-time).
So I was running scheduler.run_action for all the schedules and only now I noticed that the behavior is not that expected: it runs the actions of the schedules even if their configured timeframe does not match the current date-time.
Meaning if, on a workday, I run_action the weekend schedule, it’s action executes nonetheless.
Would it be possible to alter this behavior in some way so that actions are only executed if the current date-time matches the configured timeframe ?
Each schedule has an associated switch exposed. You can just turn the switch off to disable a schedule. When you turn it back on, the schedule will make sure everything is put in its correct state for that schedule.
That would be the obvious thing to happen, but it does not happen like that.
Eg. I have a schedule for controlling a climate, and within that schedule the temperature should be now set to 20*.
I disable the schedule (switch); change the climate target temperature to 19*; switch back on the schedule (switch) => the climate target temperature remains set at 19*.
This is the reason I was using “run_action” once I needed to re-enable the schedules.
With a simple daily climate schedule, I can turn it off, change the climate target temperature manually, turn the schedule back on, and the target temperature gets reset to the one in the schedule. There must be something more complex going on in your system.
I have created 7 led (d1mini) based Christmas ornaments. They are listed as switches.
I want to use these as a countdown for my children.
I would like one ornament to light to come on starting (12/19)7 days prior to Christmas ending with all lights on Christmas day (12/25).
I have been using schedular for other tasks in the home, so I am somewhat familar with the BASIC concepts.
What I would like to know what would be an easy plan of action to program the schedular card?
Thank you
Such an original idea!
It should be very much possible to configure this with scheduler.
I would choose the following approach:
- Each d1mini has its own schedule for turning on the corresponding switch
- Each schedule is configured to execute daily at 08:00 AM (or whichever is preferred)
- In the options tab, the schedules have a period assigned from 12/19 - 12/25 for the first, 12/20 - 12/25 for the second, etc.
- In the options tab, you could choose to stop the schedule afterwards (it becomes disabled), or delete it.
By doing so, the schedules repeat themselves daily until Christmas, so you could turn them off at night (either within the schedule or differently). If they are kept on, the repetition would have no effect (you could also restrict the period to a single day).
I recommend to do a test run (but you have plenty of time for preparations…)
Thank you so much for the response.
This is pretty much what I thought I could do with it.
Though I do have a few questions.
Can a schedule be copied and only the entity name changed. This will save a lot setup time.
Is it possible to access a calendar in the setup to specify a date. If available I have never used the function on the two dozen schedules I have setup.
Appreciate the help.
For duplicating a schedule there is a scheduler.copy service which you could use (based on its entity ID). Duplication is currently not possible via the card.
The card should show a date picker when clicking on the text fields for defining the date period.
Unbelievable, found all of it. Started with a small test and will see how it goes.
Thank you so much @neliss this card has saved me a lot so that I do not have to create sarcastically hundreds of automations.
Appreciate the help.
@neliss thanks for a great component but I wonder if you could clarify how the re-evaluate conditions works please.
For instance if I have a time-slot with conditions then the conditions are evaluated at the start of the timeslot, if they pass then the timeslot is executed, if not then are the conditions continually re-evaluated whilst the timeslot is active and if they become true at any point then the timeslot is executed otherwise it doesn’t? I presume once the conditions are met then the checking stops?
Thanks again.
PS. The schedule card documentation doesn’t yet have any mention of re-evaluate option.
Conditions are not linked to timeslots, they apply to the schedule altogether.
With the re-evaluate conditions option disabled, the conditions are only checked in the transitions between timeslots (or when the schedule is enabled).
With the re-evaluate conditions option enabled, the conditions are checked continuously, in case the conditions are met, the action of the timeslot which is currently active is triggered. This can also occur multiple times.
Example use-case:
if you have a schedule for controlling the heat of the living room (using thermostat), you could add as condition that the living room window must be closed.
If the window is open at the time the heating must become active (so at the start of a timeslot with action ‘heat’), the action will not take place. If later the window is closed, the schedule automatically picks up and starts heating (if the option is selected).
Note that when opening the window while heating is active, the schedule will not stop the heating. This would require an additional automation (or a second schedule running in parallel with the condition that window must be open), which commands the thermostat to turn off.
In most cases you have the choice between using the re-evaluate conditions option, or using automations to trigger the enabling/disabling of the switch entity corresponding to a schedule. The effect is quite similar (since enabling a schedule causes the conditions to be evaluated), but possible you can save some automation rules by using the option.
Many thanks for the explanation, I’ll use an alternative way of achieving my aims. As a suggestion being able to have different conditions for each timeslot would make it much more flexible even if the default was for the same conditions for the whole schedule. I have a couple of scenarios.
-
90% of the time a fixed schedule works fine for our heating and hotwater. However, 10% of the time people are out when they are normally home or vice versa. In this case I was hoping to prevent the transition to the next time timeslot temperature if people were still home but make the transition if they left.
-
We have solar energy so the hotwater schedule is mostly fixed but if it’s a very sunny day then we have surplus energy at midday, so I normally overheat the tank as the energy is free. So I was hoping to have a fixed time slot for 2 hours at midday that would only transition to a higher temperature if the solar was greater than a threshold.
I can achieve this with automations but I was hoping to be able to encapsulate it all within the schedule rather than add yet more automations to the balloning list which cannot be grouped or structured together, but that’s a problem for another day.
Thanks again.
Thanks for the great work with the timer, If I may put forward another use case for better gui integration of automations, I am currently setting up a schedule to turn a light on and off via mqtt between certain times, and while timer is on the light switches on for 10 min of every hour. The best thing about using your timer is the redundancy if a message isn’t received immediately so I would like to keep the re-evaluation. Bonus points if we could adjust timer start, stop and interval via input text or timedate.
Currently I am using 2 schedules, one controlling automation and the other confirming the off period. Pretty easy really. Any idea how to set both timers using input text or datetime? Would be great to be able to set from dashboard, maybe even have calendar events update the input text and timer schedule
There is a schedule.edit
service. Call that on your helper is updated.