Scheduler card/custom component

Hi all I am trying to schedule the alarm to be armed at a certain time but it is not working. Do I need to add the code somewhere else?

You need to tell us what you have done and what way it is going wrong?

I added a schedule to arm the alarm at 10:30pm. The schedule works only if no code is set in the alarm_control_panel config (below). Is there any way a scheduler task can arm an alarm using a code?

alarm_control_panel:
  - platform: manual
    name: home_alarm
#    code: !secret alarm_code
    arming_time: 5
    delay_time: 2

My schedule looks like this:

Which works like a charm!
Only thing is, right now I’m in the third part of the scheme (pump is off, should turn on at sunrise):
It says: ‘turn pump off in 4 hours’, which it shouldn’t to. It should say: Turn On in around 8 hours (sunrise).
Did I do something wrong?

Thanks!

You have configured a daily scheme which starts at 00:00 by turning off the pump.
If you don’t want anything to happen at 00:00, you should leave the first timeslot unassigned.
From what I can see this action is quite harmless, because you already turned off the pump before sunset, so the action at midnight has no effect.

I can remove the first slot but then it will turn on at 0:00:

And I have to assign something to a slot, ‘turn on’ or ‘turn off’.
I know it’s harmless because it won’t do anything at 0:00 but it’s just weird that it shows that something will happen as in fact nothing will happen.

EDIT: nervermind, I just saw that I can also asign nothing to a slot, thanks!

I’ve been using the scheduler card for a while, works great, thanks !
But I’m running into an issue : I don’t see all my switches when I want to add a schedule (all set to auto-discovery), even if they appear in the entities list :

image

Entities :

In instance , I’d like to automate “pompe piscine”, so that you know how to say “swimming pool pump” in yet another langage :wink: . But it’s not proposed by the scheduler card Add>Switch menu.

Any ideas why ?

It seems that you configured the card to only show these 2 switches.
If you go to the card editor, you can choose which entities show up. In yaml mode this defined by the include parameter.

1 Like

Indeed… Many thanks !

Hello,

thanks a lot for this awesome scheduler component + card. I’m using it to control 16 TRV in 14 room, so it get’s quite big: each room having several schedules depending on things like “I’m in homeoffice, but my wife is not”, “we are both at home”, it’s weekend or “it’s workdays” and some more (there a 4 people living here). and of course I need conditions for: don’t heat when any of the windows in that room is open, and depending of the day of week and which time it is.

The scheduling itself works fine, but …

For all these different “states” there are boolean helpers, sometimes (person.* bring there own variables) there are build-in variable.

Now the big problem: the “options” editor (and the yaml config as well, as far as I can see) only allows for combining all given option with “alle” (AND) or “one of” (OR), and you can set NOT for any condition individually.

There are no brackets …

So, a typical condition would look like:
this schedule should be active when

  • helper “vacation” is off (vacation: on means: we are all away on that day)
    AND
  • helper windows.room is “closed”
    AND (
    • person A is at home (person.xxx = present from geolocation)
      OR
    • helper variable personBhome is true
      OR helper personAhome is true (in case geolocation fails)
      )
      AND
  • helper personB-homeoffice is false

So I would need both AND and OR, with ordering brackets.

Another example
(

  • person A is “home”
    OR
  • person B is home
    OR
  • helper for personAhome is true
    OR
  • helper for personBhome is true
    OR
  • helper for personChome is true
    OR
  • helper for personDhome is true
    )
    AND
    windows is closed
    AND
    vacation is false
    AND
    personBhomeoffice is false

Both the config file and the Scheduler-Card in Lovelace can use only expressions
either like
a AND (not b) AND c AND d and (NOT e)
or like
a OR (NOT b) OR c OR d OR (NOT e)

I can’t find a way to transform the needed set of conditions
like
a AND (NOT b) AND c AND (e OR f OR (NOT g) OR k OR r) AND NOT (h OR (NOT j))
to this (oversimplified?) form.

Any idea how to do that?

Now that HA has a built-in scheduler helper what’s going to happen with scheduler-component and scheduler-card? It would be awesome if somehow they could integrate with the built-in helper, adding on functionality.

For me the build in simple schedule is far away from this integration (but of course helpful and fast for simple, discrete cases). Hopefully, this one will stay.

@bsafh I think you are asking a question to which you already know the answer :slightly_smiling_face:
The condition logic you are describing combines nested rules (brackets), which is out of scope for this card (I wouldn’t know how to fit the necessary UI for this in the card).
I think it’s best to define some template binary_sensor (as helper) with the logic rule (or part of it), such that the card doesn’t need nested rules anymore.

@KTibow @arganto At this point the scheduler helper built-in in HA is very basic and limited. I don’t see this a direct replacement of this project in the current state. Let’s see how things progress. Perhaps at some point part of the code for this project can be removed by making use of the helper, perhaps the entire project becomes obsolete. Currently this is not the case.

1 Like

Hello @neliss !
First of all, thanks for this great project, absolutely loving it !
One question : i’m coming from an HA system named Jeedom, and one of the greatest functionnality was “Smart start” for thermostat. The goal of this functionnality is to look for next schedule trigger time and temperature, and thanks to a simple but effective algorithm, anticipate the action, depending on current temp, outside temp and wanted temp.

exemple :

  • Next trigger is beginning of a new slot, “21°C” at 6pm.
    Every 15 min, an automation or whatever look for next trigger. It’s 5:15, the system starts heating for temperature to be at 21°C at 6pm, when we get home.

I can take part of the “algorithm”, but have no clue about how to get, in an automation, or template, next trigger time and value for each of my schedule. Would you have an idea ?

Thanks a lot !

Edit: In fact, what could be nice is to be able to have the “action” in the “next-trigger” schedule attribute :+1: :+1:

Is there any nice way to create an intermediate event?
I have created several thermostate schedules that work well but now I want to create an automation which just heats the bathroom up to 22 degrees for a shower for 15 minutes by pressing a button and resumes the schedule afterwards.
It’s like a temporary event that overrules existing schedules

I’ve been using this for a while now but when I to to add a new schedule I get the error that there are no groups.

Do I have to add groups?

If so can you explain how I can do this?

Thanks

When you first add a scheduler card, you need to pick the types of entities it will be controlling. If you’ve added the card without doing this, go into edit mode for your dashboard, and edit the scheduler card. Then you’ll be able to select the types of entities.

I found a solution myself which works by creating a scene that toggles the schedules before starting the temporary heating process and toggles the switch again in the end.
Toggling is used because I have a master switch that disables / enables all heating schedules and allows me to skip the creation of another helper to safe the initial state.

Hi,
any idea why I cannot use the call_service event from the scheduler to trigger an automation?

I have a schedule which sets the temperature of the climate, when I change the temperature manually, the “call_service” even is “catched” in the automation and it is correctly triggering, but if the scheduler-component does the service_call, it does not trigger the automation…

When changing the temp manually: (from developer tools, listening for “call_service” )

event_type: call_service
data:
  domain: climate
  service: set_temperature
  service_data:
    temperature: 18
    entity_id:
      - climate.living_thermostat
origin: LOCAL
time_fired: "2022-09-30T10:47:23.515296+00:00"
context:
  id: <redacted-id>
  parent_id: <redacted-id>
  user_id: null

From Scheduler Component:

event_type: call_service
data:
  domain: climate
  service: set_temperature
  service_data:
    temperature: 18
    entity_id:
      - climate.living_thermostat
origin: LOCAL
time_fired: "2022-09-30T10:50:05.051655+00:00"
context:
  id: <redacted-id>
  parent_id: null
  user_id: null

Automation trigger:

platform: event
event_type: call_service
event_data:
  domain: climate
  service: set_temperature
  service_data:
    entity_id: climate.living_thermostat

The only difference is the “parent_id:” which is “null” in the scheduler triggered event…

Any idea why the automation is not triggered?

Thanks in advance!