Scheduler card/custom component

Hello,
i don’t know where to put the code.
i have this card :

with this code :

But the code doesn’t seems to match with the card.

The actions are only shown when you create a schedule, not in the overview.

@Cadster @guims78 Please update to v1.4.0, it should bring the slider back.

1 Like

Slider is back !!!
Very nice job.
Thanks

Okay, bug now:


Try it out by using the UI editor to add a card.

My schedules are disabled for the time being, until i need them for when it gets warmer using the climate section, but i have noticed that every time i restart HA they enable them selves, and i have to disable them again every time i restart, anyone else experiencing this ?

@andie_will5 This is a known bug in the scheduler-component.
I will fix it as soon as I find the time to investigate.
Sorry for this.

1 Like

Thanks! checkbox and slider are visible after upgrading to v1.4.1!

Hello, under climate control, you can only set the temperature and turn off the AC. How can I add another option to set the AC mode (e.g. cool, heat), as setting the temperature is not enough. Thanks!

@Motti_Bazar Currently the card does not allow you to choose changing the preset of climate entities.
This is simply because my own thermostat does not have this functionality :innocent:
There is a request for this functionality, it will be added soon.

In the meantime, you could add something like this to the card:

entities:
  climate.my_AC_entity:
    actions:
      - service: set_preset_mode
        service_data: {preset: cool}
        name: "set to cool"
      - service: set_preset_mode
        service_data: {preset: heat}
        name: "set to heat"
2 Likes

Nice! Thank you @neliss, great component!

I would like to ask for the opinion of the users on the following
As most of you know, a schedule entity is a switch.
A schedule is a switch because i wanted to give you the ability to temporarily disable it, and a disabled switch ofcourse does not trigger any actions.

Currently, a disabled schedule entity is in state off.
When enabled, a schedule calculates when the next timer should fire and sets it, then goes to state waiting.
When the timer fires, the schedule goes to state triggered, executes the action, and waits for 1 minute.
After this minute, the cycle repeats. So the next timer is calculated and the schedule goes to waiting.

Why is this switch not simply on or off?
The main reason for this, is that you can look back in the history view when it has triggered:
schedule_history
This seemed useful to me for debugging purposes.
In case your schedule did not execute the action as you expected, you can look back and see whether it triggered at the right time.
If so, the problem is related to the configuration of the action (or the targeted device itself).
Otherwise, something could be wrong in the configuration of the time and/or days (or my programming skills are just disappointing you :sweat_smile:)

What do you think?

  • It’s fine for me as it is. Focus on other stuff please.
  • A switch can only be ‘on’ or ‘off’, same for a schedule.
  • Rename state ‘waiting’ to ‘on’ and then i’m happy.
  • Would like to see a timestamp for next trigger as state.
  • Other, I will explain myself below.

0 voters

Thanks!

Hello, thanks for replying and suggesting. I added the line in and have the following issues:

  1. I see two options now for performing a command to set the AC mode to “cool” or “hot” but at the same time, I can’t also set the desired temperature. The need is for one setup screen to set both the mode and the desired temperature
  2. When selecting to execute the “cool” operation, the operation text display states the command as “Set present mode preset cool” instead of “Set to cool”
  3. When time reached to execute “cool” nothing happens. I see no command coming to the AC controller, so the time arrived but no command was executed
    Will highly appreciate help on these issues. Thanks a lot!
  1. I see two options now for performing a command to set the AC mode to “cool” or “hot” but at the same time, I can’t also set the desired temperature. The need is for one setup screen to set both the mode and the desired temperature

Ah sorry, i didn’t get this. Currently the scheduler can only execute one thing at a time, not a sequence of actions.
Your thermostat does not go to ‘heat’ automatically when you send it a temperature setpoint higher than current temperature?
If you want to set the ‘mode’, you have to make changes to the code i shared before.
You have to replace the preset with mode and use the set_hvac_mode as service.

  1. When selecting to execute the “cool” operation, the operation text display states the command as “Set present mode preset cool” instead of “Set to cool”

Should be solved with the changes i mentioned.

  1. When time reached to execute “cool” nothing happens. I see no command coming to the AC controller, so the time arrived but no command was executed
    Will highly appreciate help on these issues. Thanks a lot!

I expect this is also because you set the ‘preset’ and not the ‘mode’.

If you want the mode and temperature setpoint to be set both at the same time, you could consider to make separate schedules for each of the actions.
I assume that the order in which the commands are sent is not critical (but i’m not sure).

In the future perhaps i can find an easier way for you (allowing to select multiple actions :slightly_smiling_face:)

Hello and thanks for your help!
I first made the change of “mode” and it did not help.
Then, I changed two things: (1) service: climate.set_hvac_mode, (2) hvac_mode: cool.
Please see the updated script at the bottom of the message.
Now the cool operation works and turns on the AC at its previous set temperature, but:

  • I get now the text Set hvac mode hvac mode cool (similar to my previous issue #2)

type: ‘custom:scheduler-card’
title: שעוני שבת
entities:
climate.iotti_ac_basement:
actions:
- service: climate.set_hvac_mode
service_data:
hvac_mode: cool
name: Set to cool
- service: climate.set_hvac_mode
service_data:
hvac_mode: heat
name: Set to heat

Ah sorry. Please update the card to v1.4.2.
In v1.4.0/v.1.4.1 I made a small mistake causing the action names to look bad. :flushed:

I updated to 1.4.2 and it fixed the title issue, thanks!!!
Now the issue left is an option to set both mode and temperature together. This will really be a great feature for climate control.

Sorry for a noob question, but I haven’t been able to work out if this is possible. I want only the groups I define to appear on the card, not all of the groups defined within HA. My configuration is as follows;

  - type: 'custom:scheduler-card'
    title: "Garden Schedule"
    discover_existing: false
    domains:
      switch:
        actions:
          - service: turn_on
          - service: turn_off
        include:
          - switch.arc_a2
          - switch.arc_a3
          - switch.garden_1
          - switch.garden_2
          - switch.garden_3
          - switch.garden_4
    groups:
      Propagators:
        entities:
          - switch.arc_a2
          - switch.arc_a3
      Irregation:
        entities:
          - switch.garden_1
          - switch.garden_2
          - switch.garden_3
          - switch.garden_4

what I want is to be able to exclude irrelevant groups i.e. covers, light, climate etc. from appearing on the card. Is that possible?

@Isablend Yup. Its a matter of adding standard_configuration:false to the card.
It’s mentioned here as well. But perhaps not too clear.
Rest looks OK :+1: .

brilliant, thanks.